fix: menu switching issue

This commit is contained in:
wonfen 2025-02-24 11:37:23 +08:00
parent 34f450fcdb
commit bf374f2e85

View File

@ -154,10 +154,13 @@ const Layout = () => {
dayjs.locale(language === "zh" ? "zh-cn" : language);
i18next.changeLanguage(language);
}
}, [language]);
useEffect(() => {
if (start_page) {
navigate(start_page);
navigate(start_page, { replace: true });
}
}, [language, start_page, navigate]);
}, [start_page]);
if (!routersEles) return null;