Updated packages (Next.js 15.1.0)

Fixed linting
This commit is contained in:
gbuomprisco
2024-12-11 12:45:11 +08:00
parent be16bf70d5
commit ce63993035
28 changed files with 682 additions and 720 deletions

View File

@@ -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 (