Update i18n settings and upgrade dependencies in lockfile

This commit refactors the i18n settings in `i18n.settings.ts` to improve language handling. In addition, it updates the `pnpm-lock.yaml` file to upgrade the lockfile version and several package dependencies. Most notably, it integrates `tailwind-merge` and `@tanstack/react-table` into various packages.
This commit is contained in:
giancarlo
2024-04-20 13:17:38 +08:00
parent 6ff82ec5ef
commit 8281de12a0
34 changed files with 8128 additions and 6138 deletions

View File

@@ -45,5 +45,11 @@
"src/*"
]
}
},
"dependencies": {
"@tanstack/react-table": "^8.16.0",
"next": "14.3.0-canary.7",
"tailwind-merge": "^2.2.2",
"zod": "^3.22.4"
}
}

View File

@@ -17,7 +17,9 @@ export function I18nProvider({
settings: InitOptions;
resolver: Resolver;
}>) {
if (!client) {
// If the client is not initialized or
// the language has changed, reinitialize the client
if (!client || client.language !== settings.lng) {
throw withI18nClient(settings, resolver);
}

View File

@@ -19,7 +19,6 @@ export async function initializeServerI18n(
}
await i18nInstance
.use(initReactI18next)
.use(
resourcesToBackend(async (language, namespace, callback) => {
try {
@@ -36,6 +35,7 @@ export async function initializeServerI18n(
}
}),
)
.use(initReactI18next)
.init(settings);
return i18nInstance;