feat(SW-1012): add ternary expression for hotel images

This commit is contained in:
Fredrik Thorsson
2024-12-16 09:19:58 +01:00
parent 8c914815cb
commit 0c1a4896d0
2 changed files with 4 additions and 3 deletions

View File

@@ -124,7 +124,9 @@ export default async function HotelPage({ hotelId }: HotelPageProps) {
<Suspense fallback={<BreadcrumbsSkeleton />}> <Suspense fallback={<BreadcrumbsSkeleton />}>
<Breadcrumbs /> <Breadcrumbs />
</Suspense> </Suspense>
{images?.length && <PreviewImages images={images} hotelName={name} />} {images?.length ? (
<PreviewImages images={images} hotelName={name} />
) : null}
</header> </header>
<TabNavigation <TabNavigation
restaurantTitle={getRestaurantHeading(detailedFacilities)} restaurantTitle={getRestaurantHeading(detailedFacilities)}

View File

@@ -1,7 +1,6 @@
import { z } from "zod" import { z } from "zod"
import { ChildBedTypeEnum, type PaymentMethodEnum } from "@/constants/booking" import { ChildBedTypeEnum, type PaymentMethodEnum } from "@/constants/booking"
import { dt } from "@/lib/dt"
import { toLang } from "@/server/utils" import { toLang } from "@/server/utils"
import { import {
@@ -18,7 +17,7 @@ import { RoomPackageCodeEnum } from "@/types/components/hotelReservation/selectR
import { CurrencyEnum } from "@/types/enums/currency" import { CurrencyEnum } from "@/types/enums/currency"
import { FacilityEnum } from "@/types/enums/facilities" import { FacilityEnum } from "@/types/enums/facilities"
import { PackageTypeEnum } from "@/types/enums/packages" import { PackageTypeEnum } from "@/types/enums/packages"
import { RestaurantData, RoomData } from "@/types/hotel" import type { RestaurantData, RoomData } from "@/types/hotel"
const ratingsSchema = z const ratingsSchema = z
.object({ .object({