This commit is contained in:
2026-09-08 23:34:42 +02:00
parent 91b61caa37
commit 754b84e5f6
18 changed files with 304 additions and 72 deletions
+5
View File
@@ -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')