diff --git a/apps/web/src/components/protected-layout.tsx b/apps/web/src/components/protected-layout.tsx index 11ccc66..16abe19 100644 --- a/apps/web/src/components/protected-layout.tsx +++ b/apps/web/src/components/protected-layout.tsx @@ -133,15 +133,6 @@ function ProtectedContent() { function AdminSectionItems({ activeSection }: { activeSection: string }) { const { isMobile, setOpenMobile } = useSidebar() - const location = useLocation() - const locationKey = `${location.pathname}${location.search}` - const previousLocationKey = React.useRef(locationKey) - - React.useEffect(() => { - const previous = previousLocationKey.current - previousLocationKey.current = locationKey - if (isMobile && previous !== locationKey) setOpenMobile(false) - }, [isMobile, locationKey, setOpenMobile]) function closeMobile() { if (isMobile) setOpenMobile(false) diff --git a/apps/web/src/pages/mail.tsx b/apps/web/src/pages/mail.tsx index 485074d..b06d4fd 100644 --- a/apps/web/src/pages/mail.tsx +++ b/apps/web/src/pages/mail.tsx @@ -748,7 +748,7 @@ export function MailPage() { ) return ( -
+
{isMobile ? (
@@ -760,7 +760,7 @@ export function MailPage() { 邮箱导航 -
{sidebarContent}
+
{sidebarContent}