feat(SW-664): Hotel listing component and queries for content pages
This commit is contained in:
8
types/components/blocks/hotelListing.ts
Normal file
8
types/components/blocks/hotelListing.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import type { HotelListing } from "@/types/trpc/routers/contentstack/blocks"
|
||||
|
||||
export interface HotelListingProps {
|
||||
heading?: string
|
||||
locationFilter: HotelListing["locationFilter"]
|
||||
hotelsToInclude: HotelListing["hotelsToInclude"]
|
||||
contentType: HotelListing["contentType"]
|
||||
}
|
||||
@@ -1,9 +1,8 @@
|
||||
export type HotelListingItemProps = {
|
||||
imageUrl: string
|
||||
altText: string
|
||||
name: string
|
||||
address: string
|
||||
distanceToCentre: number
|
||||
description: string
|
||||
link: string
|
||||
import type { Hotel } from "@/types/hotel"
|
||||
import type { HotelListing } from "@/types/trpc/routers/contentstack/blocks"
|
||||
|
||||
export interface HotelListingItemProps {
|
||||
hotel: Hotel
|
||||
contentType: HotelListing["contentType"]
|
||||
url: string | null
|
||||
}
|
||||
|
||||
@@ -9,5 +9,6 @@ export namespace BlocksEnums {
|
||||
TextCols = "TextCols",
|
||||
TextContent = "TextContent",
|
||||
UspGrid = "UspGrid",
|
||||
HotelListing = "HotelListing",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ export namespace ContentPageEnum {
|
||||
TextCols = "ContentPageBlocksTextCols",
|
||||
UspGrid = "ContentPageBlocksUspGrid",
|
||||
Table = "ContentPageBlocksTable",
|
||||
HotelListing = "ContentPageBlocksHotelListing",
|
||||
}
|
||||
|
||||
export const enum sidebar {
|
||||
|
||||
8
types/enums/country.ts
Normal file
8
types/enums/country.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
export enum Country {
|
||||
Denmark = "Denmark",
|
||||
Finland = "Finland",
|
||||
Germany = "Germany",
|
||||
Norway = "Norway",
|
||||
Poland = "Poland",
|
||||
Sweden = "Sweden",
|
||||
}
|
||||
@@ -1,15 +1,16 @@
|
||||
import { z } from "zod"
|
||||
import type { z } from "zod"
|
||||
|
||||
import {
|
||||
import type {
|
||||
cardsGridSchema,
|
||||
teaserCardBlockSchema,
|
||||
} from "@/server/routers/contentstack/schemas/blocks/cardsGrid"
|
||||
import { contentSchema } from "@/server/routers/contentstack/schemas/blocks/content"
|
||||
import { dynamicContentSchema } from "@/server/routers/contentstack/schemas/blocks/dynamicContent"
|
||||
import { shortcutsSchema } from "@/server/routers/contentstack/schemas/blocks/shortcuts"
|
||||
import { tableSchema } from "@/server/routers/contentstack/schemas/blocks/table"
|
||||
import { textColsSchema } from "@/server/routers/contentstack/schemas/blocks/textCols"
|
||||
import { uspGridSchema } from "@/server/routers/contentstack/schemas/blocks/uspGrid"
|
||||
import type { contentSchema } from "@/server/routers/contentstack/schemas/blocks/content"
|
||||
import type { dynamicContentSchema } from "@/server/routers/contentstack/schemas/blocks/dynamicContent"
|
||||
import type { hotelListingSchema } from "@/server/routers/contentstack/schemas/blocks/hotelListing"
|
||||
import type { shortcutsSchema } from "@/server/routers/contentstack/schemas/blocks/shortcuts"
|
||||
import type { tableSchema } from "@/server/routers/contentstack/schemas/blocks/table"
|
||||
import type { textColsSchema } from "@/server/routers/contentstack/schemas/blocks/textCols"
|
||||
import type { uspGridSchema } from "@/server/routers/contentstack/schemas/blocks/uspGrid"
|
||||
|
||||
export interface TeaserCard extends z.output<typeof teaserCardBlockSchema> {}
|
||||
export interface CardsGrid extends z.output<typeof cardsGridSchema> {}
|
||||
@@ -21,3 +22,5 @@ export interface TableBlock extends z.output<typeof tableSchema> {}
|
||||
export type TableData = TableBlock["table"]
|
||||
export interface TextCols extends z.output<typeof textColsSchema> {}
|
||||
export interface UspGrid extends z.output<typeof uspGridSchema> {}
|
||||
interface GetHotelListing extends z.output<typeof hotelListingSchema> {}
|
||||
export type HotelListing = GetHotelListing["hotel_listing"]
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import { z } from "zod"
|
||||
import type { z } from "zod"
|
||||
|
||||
import {
|
||||
import type {
|
||||
contentBlock,
|
||||
hotelPageRefsSchema,
|
||||
hotelPageSchema,
|
||||
hotelPageUrlSchema,
|
||||
} from "@/server/routers/contentstack/hotelPage/output"
|
||||
import { activitiesCardSchema } from "@/server/routers/contentstack/schemas/blocks/activitiesCard"
|
||||
import type { activitiesCardSchema } from "@/server/routers/contentstack/schemas/blocks/activitiesCard"
|
||||
|
||||
export interface GetHotelPageData extends z.input<typeof hotelPageSchema> {}
|
||||
export interface HotelPage extends z.output<typeof hotelPageSchema> {}
|
||||
@@ -18,3 +19,7 @@ export interface GetHotelPageRefsSchema
|
||||
extends z.input<typeof hotelPageRefsSchema> {}
|
||||
|
||||
export interface HotelPageRefs extends z.output<typeof hotelPageRefsSchema> {}
|
||||
|
||||
export interface GetHotelPageUrlData
|
||||
extends z.input<typeof hotelPageUrlSchema> {}
|
||||
export type HotelPageUrl = z.output<typeof hotelPageUrlSchema>
|
||||
|
||||
Reference in New Issue
Block a user