Add confirm
This commit is contained in:
parent
ee31b639b2
commit
efd0dab792
|
|
@ -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<CatalogItemLongDto | null>(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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue