diff --git a/src/platform/i18n.tsx b/src/platform/i18n.tsx index 70db7f3..ccc71e6 100644 --- a/src/platform/i18n.tsx +++ b/src/platform/i18n.tsx @@ -73,14 +73,18 @@ export function autoMatchRegion() { export function useRegion() { const appSettings = useStore($settings); - return createMemo(() => { - const settings = appSettings(); - if (typeof settings.region !== "undefined") { - return settings.region; - } else { - return autoMatchRegion(); - } - }); + return createMemo( + () => { + const settings = appSettings(); + if (typeof settings.region !== "undefined") { + return settings.region; + } else { + return autoMatchRegion(); + } + }, + "en_GB", + { name: "region" }, + ); } async function importDateFnLocale(tag: string): Promise { @@ -100,7 +104,9 @@ async function importDateFnLocale(tag: string): Promise { * Provides runtime values and fetch dependencies for date-fns locale */ export const DateFnScope: ParentComponent = (props) => { - const [dateFnLocale, setDateFnLocale] = createSignal(enGB); + const [dateFnLocale, setDateFnLocale] = createSignal(enGB, { + name: "dateFnLocale", + }); const region = useRegion(); createEffect(() => {