feat: add validation to enter details flow

This commit is contained in:
Christel Westerberg
2024-10-10 07:40:34 +02:00
parent 1bce311666
commit c9684dee11
17 changed files with 357 additions and 117 deletions

View File

@@ -2,10 +2,10 @@ import { z } from "zod"
import { detailsSchema } from "@/components/HotelReservation/EnterDetails/Details/schema"
import { User } from "@/types/user"
import type { SafeUser } from "@/types/user"
export interface DetailsSchema extends z.output<typeof detailsSchema> {}
export interface DetailsProps {
user: User | null
user: SafeUser
}

View File

@@ -0,0 +1,6 @@
export enum StepEnum {
selectBed = "select-bed",
breakfast = "breakfast",
details = "details",
payment = "payment",
}

View File

@@ -1,7 +1,7 @@
import { StepEnum } from "../../enterDetails/step"
export interface SectionAccordionProps {
header: string
isOpen: boolean
isCompleted: boolean
label: string
path: string
step: StepEnum
}