diff --git a/src/app/checkout/PageMain.tsx b/src/app/checkout/PageMain.tsx new file mode 100644 index 0000000..e8f2bea --- /dev/null +++ b/src/app/checkout/PageMain.tsx @@ -0,0 +1,263 @@ +"use client"; + +import { Tab } from "@headlessui/react"; +import { PencilSquareIcon } from "@heroicons/react/24/outline"; +import React, { FC, Fragment, useState } from "react"; +import visaPng from "@/images/vis.png"; +import mastercardPng from "@/images/mastercard.svg"; +import Input from "@/shared/Input"; +import Label from "@/components/Label"; +import Textarea from "@/shared/Textarea"; +import ButtonPrimary from "@/shared/ButtonPrimary"; +import StartRating from "@/components/StartRating"; +import NcModal from "@/shared/NcModal"; +import ModalSelectDate from "@/components/ModalSelectDate"; +import converSelectedDateToString from "@/utils/converSelectedDateToString"; +import ModalSelectGuests from "@/components/ModalSelectGuests"; +import Image from "next/image"; +import { GuestsObject } from "../(client-components)/type"; + +export interface CheckOutPagePageMainProps { + className?: string; +} + +const CheckOutPagePageMain: FC = ({ + className = "", +}) => { + const [startDate, setStartDate] = useState( + new Date("2023/02/06") + ); + const [endDate, setEndDate] = useState(new Date("2023/02/23")); + + const [guests, setGuests] = useState({ + guestAdults: 2, + guestChildren: 1, + guestInfants: 1, + }); + + const renderSidebar = () => { + return ( +
+
+
+
+ +
+
+
+
+ + Hotel room in Tokyo, Jappan + + + The Lounge & Bar + +
+ + 2 beds ยท 2 baths + +
+ +
+
+
+

Price detail

+
+ $19 x 3 day + $57 +
+
+ Service charge + $0 +
+ +
+
+ Total + $57 +
+
+
+ ); + }; + + const renderMain = () => { + return ( +
+

+ Confirm and payment +

+
+
+
+

Your trip

+ ( + openModal()} + className="block lg:hidden underline mt-1 cursor-pointer" + > + View booking details + + )} + renderContent={renderSidebar} + modalTitle="Booking details" + /> +
+
+ ( + + )} + /> + + ( + + )} + /> +
+
+ +
+

Pay with

+
+ +
+ + + + {({ selected }) => ( + + )} + + + {({ selected }) => ( + + )} + + + + + +
+ + +
+
+ + +
+
+
+ + +
+
+ + +
+
+
+ +