feat: SW-280 implement basic details component
This commit is contained in:
@@ -1,5 +1,3 @@
|
|||||||
import { notFound } from "next/navigation"
|
|
||||||
|
|
||||||
import { serverClient } from "@/lib/trpc/server"
|
import { serverClient } from "@/lib/trpc/server"
|
||||||
import tempHotelData from "@/server/routers/hotels/tempHotelData.json"
|
import tempHotelData from "@/server/routers/hotels/tempHotelData.json"
|
||||||
|
|
||||||
@@ -165,7 +163,7 @@ export default async function SectionsPage({
|
|||||||
header={intl.formatMessage({ id: "Your details" })}
|
header={intl.formatMessage({ id: "Your details" })}
|
||||||
path={`details?${currentSearchParams}`}
|
path={`details?${currentSearchParams}`}
|
||||||
>
|
>
|
||||||
{params.section === "details" && <Details />}
|
{params.section === "details" && <Details nextPath="payment" />}
|
||||||
</SectionAccordion>
|
</SectionAccordion>
|
||||||
<SectionAccordion
|
<SectionAccordion
|
||||||
header={intl.formatMessage({ id: "Payment info" })}
|
header={intl.formatMessage({ id: "Payment info" })}
|
||||||
|
|||||||
@@ -1,6 +1,20 @@
|
|||||||
"use client"
|
"use client"
|
||||||
|
import { useSearchParams } from "next/navigation"
|
||||||
|
|
||||||
|
import Button from "@/components/TempDesignSystem/Button"
|
||||||
|
|
||||||
import styles from "./details.module.css"
|
import styles from "./details.module.css"
|
||||||
|
|
||||||
export default function Details() {
|
import { DetailsProps } from "@/types/components/hotelReservation/selectRate/section"
|
||||||
return <div className={styles.wrapper}>Details TBI</div>
|
|
||||||
|
export default function Details({ nextPath }: DetailsProps) {
|
||||||
|
const searchParams = useSearchParams()
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className={styles.wrapper}>
|
||||||
|
<form method="GET" action={`${nextPath}?${searchParams}`}>
|
||||||
|
<Button type="submit">Submit</Button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,6 +31,8 @@ export interface RoomSelectionProps extends SectionProps {
|
|||||||
nrOfNights: number
|
nrOfNights: number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface DetailsProps extends SectionProps {}
|
||||||
|
|
||||||
export interface SectionPageProps {
|
export interface SectionPageProps {
|
||||||
breakfast?: string
|
breakfast?: string
|
||||||
bed?: string
|
bed?: string
|
||||||
|
|||||||
Reference in New Issue
Block a user