mirror of
https://github.com/hamster1963/nezha-dash.git
synced 2025-04-24 21:10:45 +08:00
perf: disable router.refresh
This commit is contained in:
parent
9cedaf0c5a
commit
8d4b6b81b7
@ -1,4 +1,3 @@
|
||||
import { useTranslations } from "next-intl";
|
||||
import ServerList from "../../../components/ServerList";
|
||||
import ServerOverview from "../../../components/ServerOverview";
|
||||
import getEnv from "../../../lib/env-entry";
|
||||
|
@ -40,12 +40,11 @@ export function LanguageSwitcher() {
|
||||
pathname === currentLocalePath ||
|
||||
pathname === `${currentLocalePath}/`
|
||||
) {
|
||||
router.replace(newLocalePath);
|
||||
router.push(newLocalePath);
|
||||
} else {
|
||||
const newPath = constructLocalePath(pathname, newLocale);
|
||||
router.replace(newPath);
|
||||
router.push(newPath);
|
||||
}
|
||||
router.refresh();
|
||||
};
|
||||
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user