Files
web/types/params.ts
Erik Tiekstra 7ac200bd7c Merged in feat/SW-1442-destination-overview-page (pull request #1188)
feat(SW-1442): added destination overview page

* feat(SW-1442): added destination overview page


Approved-by: Fredrik Thorsson
Approved-by: Matilda Landström
2025-01-20 12:21:04 +00:00

50 lines
1.0 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
}
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>)