chore(web): enforce valid translation keys using typescript (#12106)

This commit is contained in:
Michel Heusschen
2024-08-29 14:41:39 +02:00
committed by GitHub
parent bab5ad7ebd
commit 9f5a3f1e84
7 changed files with 48 additions and 49 deletions
+2 -2
View File
@@ -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') + ' 🎉',