diff --git a/src/app/confirm/page.tsx b/src/app/confirm/page.tsx index c71398c..a7797dc 100644 --- a/src/app/confirm/page.tsx +++ b/src/app/confirm/page.tsx @@ -10,11 +10,15 @@ import { useRouter, useSearchParams } from "next/navigation"; import useApiClient from "@/hooks/useApiClient"; import { getImageUrl, formatPrice, calculateTotalPrice } from "@/lib/utils"; import { parseISO } from "date-fns"; +import useAuthStore from "@/stores/useAuthStore"; import { CatalogItemLongDto } from "@/api/types"; function ConfirmPageContent() { const [yacht, setYacht] = useState(null); + const { getUserId } = useAuthStore(); + + const userId = getUserId(); const client = useApiClient(); const [promocode, setPromocode] = useState(""); const [isPromocodeApplied, setIsPromocodeApplied] = useState(false); @@ -181,7 +185,7 @@ function ConfirmPageContent() { startUtc, endUtc, yachtId: Number(yachtId), - reservatorId: Number("userId"), // TODO + reservatorId: Number(userId), }; await client.post("/reservations", body);