Updated packages (Next.js 15.1.0)
Fixed linting
This commit is contained in:
@@ -43,24 +43,24 @@
|
||||
"@kit/tailwind-config": "workspace:*",
|
||||
"@kit/tsconfig": "workspace:*",
|
||||
"@radix-ui/react-icons": "^1.3.2",
|
||||
"@tanstack/react-query": "5.62.3",
|
||||
"@tanstack/react-query": "5.62.7",
|
||||
"@tanstack/react-table": "^8.20.5",
|
||||
"@types/react": "npm:types-react@19.0.0-rc.1",
|
||||
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
|
||||
"class-variance-authority": "^0.7.1",
|
||||
"date-fns": "^4.1.0",
|
||||
"eslint": "^8.57.0",
|
||||
"next": "15.0.4",
|
||||
"next": "15.1.0",
|
||||
"next-themes": "0.4.4",
|
||||
"prettier": "^3.4.2",
|
||||
"react-day-picker": "^8.10.1",
|
||||
"react-hook-form": "^7.54.0",
|
||||
"react-i18next": "^15.1.3",
|
||||
"react-i18next": "^15.1.4",
|
||||
"sonner": "^1.7.1",
|
||||
"tailwindcss": "3.4.16",
|
||||
"tailwindcss-animate": "^1.0.7",
|
||||
"typescript": "^5.7.2",
|
||||
"zod": "^3.23.8"
|
||||
"zod": "^3.24.1"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"root": true,
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
import { useCallback, useMemo, useState } from 'react';
|
||||
|
||||
import { useRouter } from 'next/navigation';
|
||||
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import {
|
||||
@@ -20,7 +18,6 @@ export function LanguageSelector({
|
||||
onChange?: (locale: string) => unknown;
|
||||
}) {
|
||||
const { i18n } = useTranslation();
|
||||
const router = useRouter();
|
||||
const { language: currentLanguage, options } = i18n;
|
||||
|
||||
const locales = (options.supportedLngs as string[]).filter(
|
||||
@@ -46,9 +43,9 @@ export function LanguageSelector({
|
||||
await i18n.changeLanguage(locale);
|
||||
|
||||
// refresh cached translations
|
||||
router.refresh();
|
||||
window.location.reload();
|
||||
},
|
||||
[i18n, router, onChange],
|
||||
[i18n, onChange],
|
||||
);
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user