1
0
mirror of https://github.com/uetchy/namae.git synced 2025-08-20 09:58:13 +09:00

fix: type errors

This commit is contained in:
2022-03-09 15:16:54 +09:00
parent 4c256c7c3b
commit 8092ba0903
20 changed files with 70 additions and 69 deletions

View File

@@ -4,7 +4,8 @@ import '@testing-library/jest-dom/extend-expect';
// i18next
import { join } from 'path';
import i18n from 'i18next';
import Backend from 'i18next-node-fs-backend';
import Backend from 'i18next-chained-backend';
import NodeFs from 'i18next-node-fs-backend';
import LanguageDetector from 'i18next-browser-languagedetector';
import { initReactI18next } from 'react-i18next';
@@ -14,7 +15,10 @@ i18n
.use(initReactI18next)
.init({
backend: {
loadPath: join(__dirname, '../public/locales/{{lng}}/{{ns}}.json'),
backends: [NodeFs],
backendOptions: [
{ loadPath: join(__dirname, '../public/locales/{{lng}}/{{ns}}.json') },
],
},
fallbackLng: 'en',
ns: ['translation'],

View File

@@ -21,7 +21,7 @@ export function trackEvent({
if (isProduction) {
try {
umami && umami.trackEvent(value, type);
} catch (err) {}
} catch (err: any) {}
}
}