fix(build): Types in admin-calendar, oRPC React Query Helpers in booking-status, Router-Namenskonflikt, entferne unsupported allowedHosts aus Vite

This commit is contained in:
2025-10-01 21:28:21 +02:00
parent 52280b1b3b
commit 4acb639e66
4 changed files with 9 additions and 10 deletions

View File

@@ -61,13 +61,15 @@ export default function BookingStatusPage({ token }: BookingStatusPageProps) {
// Fetch booking details
const { data: booking, isLoading, error, refetch } = useQuery({
queryKey: ["booking", "status", token],
queryFn: () => queryClient.cancellation.getBookingByToken({ token }),
// oRPC React Query Helper liefert .queryOptions()
...queryClient.cancellation.getBookingByToken.queryOptions({ token }),
retry: false,
});
// Cancellation mutation
const cancelMutation = useMutation({
mutationFn: () => queryClient.cancellation.cancelByToken({ token }),
// oRPC React Query Helper liefert .mutationOptions()
...queryClient.cancellation.cancelByToken.mutationOptions(),
onSuccess: (result) => {
setCancellationResult({
success: true,
@@ -90,7 +92,7 @@ export default function BookingStatusPage({ token }: BookingStatusPageProps) {
const handleCancel = () => {
setIsCancelling(true);
setCancellationResult(null);
cancelMutation.mutate();
cancelMutation.mutate({ token });
};
if (isLoading) {