chore(web): enforce valid translation keys using typescript (#12106)
This commit is contained in:
@@ -12,7 +12,6 @@ export const ssr = false;
|
||||
export const csr = true;
|
||||
|
||||
export const load = (async ({ fetch }) => {
|
||||
let $t = (arg: string) => arg;
|
||||
try {
|
||||
await init(fetch);
|
||||
const authenticated = await loadUser();
|
||||
@@ -26,7 +25,6 @@ export const load = (async ({ fetch }) => {
|
||||
redirect(302, AppRoute.AUTH_LOGIN);
|
||||
}
|
||||
|
||||
$t = await getFormatter();
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
} catch (redirectError: any) {
|
||||
if (redirectError?.status === 302) {
|
||||
@@ -34,6 +32,8 @@ export const load = (async ({ fetch }) => {
|
||||
}
|
||||
}
|
||||
|
||||
const $t = await getFormatter();
|
||||
|
||||
return {
|
||||
meta: {
|
||||
title: $t('welcome') + ' 🎉',
|
||||
|
||||
Reference in New Issue
Block a user