"use client"; import Link from "next/link"; import type { MouseEvent } from "react"; import styles from "./memos.module.css"; type MemoExplorerProps = { userId: string | null; isVip: boolean; pathname: string; onVipRequired?: () => void; }; const ROUTES = { HOME: "/community", EXPLORE: "/community/explore", ARCHIVED: "/community/archived", ATTACHMENTS: "/community/attachments", } as const; export function MemoExplorer({ userId, isVip, pathname, onVipRequired }: MemoExplorerProps) { const navItems = [ { href: ROUTES.HOME, label: "星球首页", icon: "主" }, { href: ROUTES.EXPLORE, label: "发现话题", icon: "搜" }, { href: ROUTES.ARCHIVED, label: "归档内容", icon: "档" }, { href: ROUTES.ATTACHMENTS, label: "附件资料", icon: "图" }, ]; const handleNavClick = (event: MouseEvent, href: string) => { if (!isVip && href !== ROUTES.HOME) { event.preventDefault(); onVipRequired?.(); } }; return ( ); }