From 2649f9f56f50916db4cfcfee92ee423a8e213626 Mon Sep 17 00:00:00 2001 From: Joel Date: Thu, 6 Feb 2025 14:07:43 +0800 Subject: [PATCH] fix: deperacted menu active --- web/app/components/base/select/locale.tsx | 38 ++++++------- .../header/account-dropdown/index.tsx | 54 +++++++++---------- 2 files changed, 44 insertions(+), 48 deletions(-) diff --git a/web/app/components/base/select/locale.tsx b/web/app/components/base/select/locale.tsx index b7b2d5cbbf..d2097c62ba 100644 --- a/web/app/components/base/select/locale.tsx +++ b/web/app/components/base/select/locale.tsx @@ -44,17 +44,15 @@ export default function Select({
{items.map((item) => { return - {({ active }) => ( - - )} + })} @@ -94,16 +92,14 @@ export function InputSelect({
{items.map((item) => { return - {({ active }) => ( - - )} + })} diff --git a/web/app/components/header/account-dropdown/index.tsx b/web/app/components/header/account-dropdown/index.tsx index faa0c8588e..8fa5c459eb 100644 --- a/web/app/components/header/account-dropdown/index.tsx +++ b/web/app/components/header/account-dropdown/index.tsx @@ -100,60 +100,60 @@ export default function AppSelector({ isMobile }: IAppSelector) {
- {({ active }) =>
{t('common.account.account')}
- } +
- {({ active }) =>
setShowAccountSettingModal({ payload: 'members' })}>
{t('common.userProfile.settings')}
-
} +
{canEmailSupport && - {({ active }) =>
{t('common.userProfile.emailSupport')}
-
} +
} - {({ active }) =>
{t('common.userProfile.communityFeedback')}
- } +
- {({ active }) =>
{t('common.userProfile.community')}
- } +
- {({ active }) =>
{t('common.userProfile.helpCenter')}
- } +
- {({ active }) =>
{t('common.userProfile.roadmap')}
- } +
{ document?.body?.getAttribute('data-public-site-about') !== 'hide' && ( - {({ active }) =>
setAboutVisible(true)}>
{t('common.userProfile.about')}
{langeniusVersionInfo.current_version}
-
} +
) }
- {({ active }) =>
handleLogout()}> +
handleLogout()}>
{t('common.userProfile.logout')}
-
} +