"use client" import Link from "next/link" import { usePathname } from "next/navigation" import { BarChart3, FileText, Home, LightbulbIcon, LogOut, MessageSquare, Settings, User, VoteIcon, Info, ExternalLink, History, Bell, Twitter, Github, Linkedin, ClipboardList, ShieldCheck, ShieldAlert, } from "lucide-react" import { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarMenu, SidebarMenuButton, SidebarMenuItem, SidebarSeparator, SidebarTrigger, } from "@/components/ui/sidebar" import { Avatar, AvatarFallback } from "@/components/ui/avatar" import { ConnectWalletButton } from "@/components/connect-wallet-button" import { useWalletStore } from "@/lib/wallet-store" import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, } from "@/components/ui/dropdown-menu" import { Button } from "@/components/ui/button" export function AppSidebar() { const pathname = usePathname() const { walletConnected, walletAddress, username, isVerified, disconnectWallet } = useWalletStore() const isActive = (path: string) => { if (path === '/') { return pathname === path } return pathname?.startsWith(path) } const mainNavItems = [ { title: "Home", icon: Home, href: "/", }, { title: "Issues", icon: ClipboardList, href: "/issues", }, { title: "Submit Perspective", icon: MessageSquare, href: "/submit", }, { title: "Insights Dashboard", icon: LightbulbIcon, href: "/insights", }, { title: "Contributions", icon: VoteIcon, href: "/contributions", }, { title: "Resolutions", icon: FileText, href: "/resolutions", }, { title: "About", icon: Info, href: "/about", }, ] const userNavItems = [ { title: "Profile", icon: User, href: "/profile", }, { title: "Settings", icon: Settings, href: "/settings", }, ] return (
VoxPop
{walletConnected ? (
{username?.[0] || "V"}
{username || "VoxPop User"} {isVerified ? ( ) : ( )}
{walletAddress}
{isVerified ? "Verified User (Full Access)" : "Unverified User (Limited Access)" }
Account Transaction History Notifications Disconnect
) : ( )}
Navigation {mainNavItems.map((item) => ( {item.title} ))} User {userNavItems.map((item) => ( {item.title} ))} {walletConnected && ( Disconnect )}
) }