chore: remove next-i18next (#1242)

This commit is contained in:
Himself65
2023-03-01 16:11:24 -06:00
committed by GitHub
parent 3afecc8ee7
commit 5cda4a5ebc
4 changed files with 193 additions and 93 deletions

View File

@@ -28,16 +28,15 @@
"dependencies": {
"@affine/debug": "workspace:*",
"i18next": "^22.4.10",
"next-i18next": "^13.1.5",
"react": "^18.2.0",
"react-i18next": "^12.1.5"
"react-i18next": "^12.2.0"
},
"devDependencies": {
"@types/node": "^18.14.0",
"@types/node": "^18.14.2",
"@types/prettier": "^2.7.2",
"prettier": "^2.8.4",
"ts-node": "^10.9.1",
"typescript": "^4.9.5",
"next": "^13.2.2"
"next": "^13.2.3"
}
}

View File

@@ -1,5 +1,4 @@
import i18next, { i18n, Resource } from 'i18next';
import { appWithTranslation } from 'next-i18next';
import {
I18nextProvider,
initReactI18next,
@@ -38,7 +37,7 @@ declare module 'react-i18next' {
const STORAGE_KEY = 'i18n_lng';
export { appWithTranslation, I18nextProvider, LOCALES, Trans, useTranslation };
export { I18nextProvider, LOCALES, Trans, useTranslation };
const resources = LOCALES.reduce<Resource>(
(acc, { tag, res }) => ({ ...acc, [tag]: { translation: res } }),