There was an error while loading. Please reload this page.
LocalizationContext
1 parent ff095c4 commit 7564df0Copy full SHA for 7564df0
1 file changed
client/js/helpers/i18n.ts
@@ -116,7 +116,9 @@ export function i18nFormat(
116
return formatted;
117
}
118
119
-export const LocalizationContext = React.createContext(undefined);
+export const LocalizationContext = React.createContext<Translate>(() => {
120
+ throw new Error('Missing l10n context');
121
+});
122
123
export type Translate = (
124
translated: MessageKey,
0 commit comments