From 571246b4eb29e32e2b86f2e0127d672b4496212c Mon Sep 17 00:00:00 2001 From: xiaokang Date: Tue, 6 Aug 2024 10:33:24 +0800 Subject: [PATCH] fix: remove the locale menu when menu is set to false --- src/layout/SpaceContainer/Sider/MineItem/Locale.tsx | 3 --- src/layout/SpaceContainer/Sider/MineItem/index.tsx | 12 ++++++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/layout/SpaceContainer/Sider/MineItem/Locale.tsx b/src/layout/SpaceContainer/Sider/MineItem/Locale.tsx index 1483aa17a..6f0898feb 100644 --- a/src/layout/SpaceContainer/Sider/MineItem/Locale.tsx +++ b/src/layout/SpaceContainer/Sider/MineItem/Locale.tsx @@ -30,9 +30,6 @@ const Locale: React.FC = function () { const localeObj = localeList.find((item) => item.value.toLowerCase() === locale?.toLowerCase()) || localeList.find((item) => item.value?.toLowerCase() === defaultLocale?.toLowerCase()); - if (!odc.appConfig.locale.menu) { - return null; - } return ( = function ({ children, userStore, settingStore }, }); } - menu.push({ - label: , - key: 'locale', - }); + if (odc.appConfig.locale.menu) { + menu.push({ + label: , + key: 'locale', + }); + } + if (settingStore.enablePersonalRecord) { menu.push({ key: 'record',