sitcod3 commited on
Commit
9b5f2e5
·
verified ·
1 Parent(s): f62c0b5

Upload src/components/Sidebar.tsx with huggingface_hub

Browse files
Files changed (1) hide show
  1. src/components/Sidebar.tsx +66 -0
src/components/Sidebar.tsx ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { Link, useLocation } from "react-router-dom";
2
+ import {
3
+ LayoutDashboard,
4
+ Megaphone,
5
+ Users,
6
+ Mail,
7
+ Flame,
8
+ Inbox,
9
+ Webhook,
10
+ BarChart2,
11
+ Building2,
12
+ Settings
13
+ } from "lucide-react";
14
+ import { cn } from "../utils/cn";
15
+ import AnimatedLogo from "./AnimatedLogo";
16
+ import Logo from "./Logo";
17
+
18
+ const navigation = [
19
+ { name: "Dashboard", href: "/", icon: LayoutDashboard },
20
+ { name: "Campaigns", href: "/campaigns", icon: Megaphone },
21
+ { name: "Leads", href: "/leads", icon: Users },
22
+ { name: "Email Accounts", href: "/email-accounts", icon: Mail },
23
+ { name: "Warmup", href: "/warmup", icon: Flame },
24
+ { name: "Unified Inbox", href: "/inbox", icon: Inbox },
25
+ { name: "Webhooks", href: "/webhooks", icon: Webhook },
26
+ { name: "Analytics", href: "/analytics", icon: BarChart2 },
27
+ { name: "Clients", href: "/clients", icon: Building2 },
28
+ { name: "Settings", href: "/settings", icon: Settings },
29
+ ];
30
+
31
+ export default function Sidebar({ onClose }: { onClose?: () => void }) {
32
+ const location = useLocation();
33
+
34
+ return (
35
+ <div className="w-64 border-r border-white/5 bg-zinc-950/80 md:bg-zinc-950/40 backdrop-blur-xl flex flex-col shrink-0 h-full relative z-20 shadow-[4px_0_24px_-4px_rgba(0,0,0,0.5)]">
36
+ <div className="h-16 flex items-center px-6 border-b border-white/5 shrink-0 gap-3">
37
+ <AnimatedLogo className="w-7 h-7" />
38
+ <Logo />
39
+ </div>
40
+ <nav className="flex-1 overflow-y-auto py-4 px-3 space-y-1.5">
41
+ {navigation.map((item) => {
42
+ const isActive = location.pathname === item.href || (item.href !== "/" && location.pathname.startsWith(item.href));
43
+ return (
44
+ <Link
45
+ key={item.name}
46
+ to={item.href}
47
+ onClick={onClose}
48
+ className={cn(
49
+ "w-full flex items-center gap-3 px-3 py-2.5 text-[13px] font-medium rounded-lg transition-all duration-300 relative group overflow-hidden",
50
+ isActive
51
+ ? "text-indigo-300 bg-white/5 border border-white/10 shadow-[inset_0_1px_1px_rgba(255,255,255,0.05)]"
52
+ : "text-zinc-400 hover:text-zinc-200 hover:bg-white/5 border border-transparent"
53
+ )}
54
+ >
55
+ {isActive && (
56
+ <div className="absolute left-0 top-1/2 -translate-y-1/2 w-1 h-6 bg-indigo-500 rounded-r-full shadow-[0_0_10px_rgba(99,102,241,0.8)]" />
57
+ )}
58
+ <item.icon className={cn("w-4 h-4 transition-transform duration-300 group-hover:scale-110", isActive ? "text-indigo-400 drop-shadow-[0_0_8px_rgba(99,102,241,0.5)]" : "text-zinc-500")} />
59
+ {item.name}
60
+ </Link>
61
+ );
62
+ })}
63
+ </nav>
64
+ </div>
65
+ );
66
+ }