diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx new file mode 100644 index 0000000..d92cb41 --- /dev/null +++ b/src/components/Sidebar.tsx @@ -0,0 +1,105 @@ +import { useState } from "react"; +import { Link } from "react-router-dom"; +import { Button } from "@/components/ui/button"; +import { Sheet, SheetContent, SheetTrigger } from "@/components/ui/sheet"; +import { Separator } from "@/components/ui/separator"; +import { + LayoutDashboard, BarChart3, Users, FileText, Settings, + User, LogOut, ChevronLeft, Activity +} from "lucide-react"; +import { useAuth } from "@/hooks/use-tygarun"; + +interface SidebarProps { + activePath: string; +} + +const navItems = [ + { label: "Dashboard", icon: LayoutDashboard, path: "/" }, + { label: "Analytics", icon: BarChart3, path: "/analytics" }, + { label: "Users", icon: Users, path: "/users" }, + { label: "Reports", icon: FileText, path: "/reports" }, + { label: "Settings", icon: Settings, path: "/settings" }, + { label: "Profile", icon: User, path: "/profile" }, +]; + +function SidebarContent({ activePath }: SidebarProps) { + const { user, isSignedIn, signin, signout } = useAuth(); + const displayName = user?.name || user?.email || "Sarah Mitchell"; + const displayRole = user?.role || "Admin"; + const initials = displayName.split(" ").map((p) => p[0]).join("").slice(0, 2).toUpperCase(); + return ( +
Analytics Dashboard
+{displayName}
+{displayRole}
+