feat(locale): persist household and member preferences

This commit is contained in:
2026-03-09 13:17:25 +04:00
parent bebff07ee8
commit 9de6bcc31b
16 changed files with 2704 additions and 37 deletions

View File

@@ -0,0 +1,14 @@
export const SUPPORTED_LOCALES = ['en', 'ru'] as const
export type SupportedLocale = (typeof SUPPORTED_LOCALES)[number]
export function normalizeSupportedLocale(value?: string | null): SupportedLocale | null {
const normalized = value?.trim().toLowerCase()
if (!normalized) {
return null
}
return (SUPPORTED_LOCALES as readonly string[]).includes(normalized)
? (normalized as SupportedLocale)
: null
}