"use client"; import { useState } from "react"; import Link from "next/link"; import { usePathname } from "next/navigation"; const navLinks = [ { label: "城市", icon: "🏙️", href: "/" }, { label: "旅行", icon: "✈️", href: "/meetups" }, { label: "社区", icon: "💬", href: "/dating" }, { label: "探索", icon: "🎒", href: "/#community" }, ]; export default function Navbar() { const [mobileOpen, setMobileOpen] = useState(false); const pathname = usePathname(); function isActive(href: string) { if (href.startsWith("/#")) return false; if (href === "/") return pathname === "/"; return pathname.startsWith(href); } return ( ); }