40 lines
717 B
TypeScript
40 lines
717 B
TypeScript
import { Lang } from "@/constants/languages"
|
|
|
|
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: "loyalty-page" | "content-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>)
|