fix: clean up hotel and its typings

This commit is contained in:
Simon Emanuelsson
2024-12-17 16:17:25 +01:00
parent ec74af8814
commit 13a164242f
110 changed files with 1931 additions and 1559 deletions

View File

@@ -1,6 +1,6 @@
import { z } from "zod"
import { breakfastPackageSchema } from "@/server/routers/hotels/output"
import { breakfastPackageSchema } from "@/server/routers/hotels/schemas/packages"
export const breakfastStoreSchema = z.object({
breakfast: breakfastPackageSchema.or(z.literal(false)),

View File

@@ -10,10 +10,10 @@ import styles from "./header.module.css"
import type { HotelHeaderProps } from "@/types/components/hotelReservation/enterDetails/hotelHeader"
export default async function HotelHeader({ hotelData }: HotelHeaderProps) {
export default async function HotelHeader({
hotelData: { hotel },
}: HotelHeaderProps) {
const intl = await getIntl()
const hotel = hotelData.data.attributes
const image = hotel.hotelContent?.images
const addressStr = `${hotel.address.streetAddress}, ${hotel.address.city}`