Files
users/components/platform-nav.tsx
v0 22e725887a refactor: restructure project into 5 core modules
Organize project by 5 core modules based on requirement docs.

Co-authored-by: null <4804959+fnvtk@users.noreply.github.com>
2026-01-31 04:18:24 +00:00

59 lines
2.0 KiB
TypeScript

"use client"
import Link from "next/link"
import { usePathname } from 'next/navigation'
import { LayoutDashboard, Database, Users, DollarSign, Brain, Settings, Home } from 'lucide-react'
import { cn } from "@/lib/utils"
const navItems = [
{ href: "/platform/dashboard", icon: LayoutDashboard, label: "平台总览" },
{ href: "/platform/data-management", icon: Database, label: "数据管理" },
{ href: "/platform/user-portrait", icon: Users, label: "用户画像" },
{ href: "/platform/value-assessment", icon: DollarSign, label: "价值评估" },
{ href: "/platform/ai-assistant", icon: Brain, label: "AI助手" },
]
export default function PlatformNav() {
const pathname = usePathname()
return (
<nav className="fixed left-0 top-0 h-screen w-64 bg-white border-r border-gray-200 p-6">
<div className="mb-8">
<h2 className="text-2xl font-bold text-gray-900 mb-1"></h2>
<p className="text-sm text-gray-600"></p>
</div>
<div className="space-y-2">
<Link
href="/"
className="flex items-center gap-3 px-4 py-3 rounded-lg transition-colors text-gray-600 hover:bg-gray-100 hover:text-gray-900"
>
<Home className="w-5 h-5" />
<span className="font-medium"></span>
</Link>
{navItems.map((item) => {
const Icon = item.icon
const isActive = pathname === item.href
return (
<Link
key={item.href}
href={item.href}
className={cn(
"flex items-center gap-3 px-4 py-3 rounded-lg transition-colors",
isActive
? "bg-blue-50 text-blue-600 font-semibold"
: "text-gray-600 hover:bg-gray-100 hover:text-gray-900"
)}
>
<Icon className="w-5 h-5" />
<span className="font-medium">{item.label}</span>
</Link>
)
})}
</div>
</nav>
)
}