From efd0dab792d5da664ac916359007b2fbcf1b4d04 Mon Sep 17 00:00:00 2001 From: iaiaiaia Date: Fri, 19 Dec 2025 21:31:40 +0300 Subject: [PATCH] Add confirm --- src/app/confirm/page.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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);