Files
web/types/params.ts
Erik Tiekstra f962400474 Merged in feat/SW-1449-destination-page (pull request #1195)
Feat/SW-1449 destination page

* feat(SW-1449): Added destination country page

* feat(SW-1449): added destination city page


Approved-by: Fredrik Thorsson
Approved-by: Matilda Landström
2025-01-21 13:57:19 +00:00

52 lines
1.1 KiB
TypeScript

import type { Lang } from "@/constants/languages"
import type { PageContentTypeEnum } from "./requests/contentType"
export type SearchParams<S = {}> = {
searchParams: S & { [key: string]: string }
}
export type Params<P = {}> = {
params: P
}
export type LangParams = {
lang: Lang
}
export type StatusParams = {
status: number
}
export type ContentTypeParams = {
contentType:
| PageContentTypeEnum.loyaltyPage
| PageContentTypeEnum.contentPage
| PageContentTypeEnum.hotelPage
| PageContentTypeEnum.collectionPage
| PageContentTypeEnum.destinationOverviewPage
| PageContentTypeEnum.destinationCountryPage
| PageContentTypeEnum.destinationCityPage
}
export type ContentTypeWebviewParams = {
contentType: "loyalty-page" | "account-page"
}
export type UIDParams = {
uid: string
}
export type UriParams = {
uri: string | string[]
}
export type PreviewParams = {
uri?: string
live_preview?: string
}
export type LayoutArgs<P = undefined> = P extends undefined ? {} : Params<P>
export type PageArgs<P = undefined, S = undefined> = LayoutArgs<P> &
(S extends undefined ? {} : SearchParams<S>)