This commit is contained in:
ditiqi 2025-02-18 09:18:45 +08:00
parent d125486795
commit e0245d46a8
1 changed files with 3 additions and 2 deletions

View File

@ -17,6 +17,7 @@ import {
} from "@ant-design/icons";
import { useAuth } from "@web/src/providers/auth-provider";
import { env } from "@web/src/env";
import { useUserAgent } from "@web/src/hooks/useUserAgent";
export interface NavItem {
to: string;
@ -31,7 +32,7 @@ export function useNavItem() {
taxonomy: { slug: TaxonomySlug.CATEGORY },
},
});
const { previewMode } = useUserAgent();
const navItems = useMemo(() => {
// 定义固定的导航项
const staticItems = {
@ -67,7 +68,7 @@ export function useNavItem() {
staticItems.letterList,
staticItems.editor,
staticItems.letterProgress,
staticItems.inbox,
!previewMode && staticItems.inbox,
staticItems.help,
].filter(Boolean);
}, [data, user]);