temp
This commit is contained in:
@@ -31,3 +31,8 @@ export const pageParam = (value: unknown): number => {
|
||||
const page = Number(value)
|
||||
return Number.isInteger(page) && page > 0 ? page : 1
|
||||
}
|
||||
|
||||
export type Locale = 'it' | 'en'
|
||||
|
||||
/** Reads the `lang` query param, falling back to the site default `it`. */
|
||||
export const localeParam = (value: unknown): Locale => (value === 'en' ? 'en' : 'it')
|
||||
|
||||
Reference in New Issue
Block a user