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

@@ -1,5 +1,3 @@
'use client';
import { SidebarDivider, SidebarGroup, SidebarItem } from '@kit/ui/sidebar';
import { Trans } from '@kit/ui/trans';
@@ -10,9 +8,11 @@ export function AccountLayoutSidebarNavigation({
}: React.PropsWithChildren<{
account: string;
}>) {
const routes = getTeamAccountSidebarConfig(account).routes;
return (
<>
{getTeamAccountSidebarConfig(account).routes.map((item, index) => {
{routes.map((item, index) => {
if ('divider' in item) {
return <SidebarDivider key={index} />;
}
@@ -55,5 +55,3 @@ export function AccountLayoutSidebarNavigation({
</>
);
}
export default AccountLayoutSidebarNavigation;

View File

@@ -56,10 +56,13 @@ export function getI18nSettings(
return {
supportedLngs: languages,
fallbackLng: defaultLanguage,
fallbackLng: languages[0],
detection: undefined,
lng,
load: 'languageOnly',
preload: false,
lowerCaseLng: true,
fallbackNS: defaultI18nNamespaces,
defaultNS: defaultI18nNamespaces,
ns,
react: {
useSuspense: true,

View File

@@ -69,6 +69,7 @@
"react-i18next": "^14.1.0",
"recharts": "^2.12.5",
"sonner": "^1.4.41",
"tailwind-merge": "^2.2.2",
"zod": "^3.22.4"
},
"devDependencies": {