- Create shared DashboardSidebar component in components/ui/ - Refactor employe/layout.tsx to use shared component - Refactor admin/Sidebar.tsx to use shared component - Reduces duplicated lines from ~60% to minimal 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
61 lines
1.1 KiB
TypeScript
61 lines
1.1 KiB
TypeScript
"use client";
|
|
|
|
import {
|
|
LayoutDashboard,
|
|
Users,
|
|
Ticket,
|
|
BarChart3,
|
|
Gift,
|
|
Trophy,
|
|
} from "lucide-react";
|
|
import DashboardSidebar from "@/components/ui/DashboardSidebar";
|
|
|
|
const navItems = [
|
|
{
|
|
label: "Dashboard",
|
|
href: "/admin/dashboard",
|
|
icon: <LayoutDashboard className="w-5 h-5" />,
|
|
color: "darkblue",
|
|
},
|
|
{
|
|
label: "Utilisateurs",
|
|
href: "/admin/utilisateurs",
|
|
icon: <Users className="w-5 h-5" />,
|
|
color: "blue",
|
|
},
|
|
{
|
|
label: "Tickets",
|
|
href: "/admin/tickets",
|
|
icon: <Ticket className="w-5 h-5" />,
|
|
color: "emerald",
|
|
},
|
|
{
|
|
label: "Lots & Prix",
|
|
href: "/admin/lots",
|
|
icon: <Gift className="w-5 h-5" />,
|
|
color: "purple",
|
|
},
|
|
{
|
|
label: "Données Marketing",
|
|
href: "/admin/marketing-data",
|
|
icon: <BarChart3 className="w-5 h-5" />,
|
|
color: "indigo",
|
|
},
|
|
{
|
|
label: "Tirages",
|
|
href: "/admin/tirages",
|
|
icon: <Trophy className="w-5 h-5" />,
|
|
color: "amber",
|
|
},
|
|
];
|
|
|
|
export default function Sidebar() {
|
|
return (
|
|
<DashboardSidebar
|
|
navItems={navItems}
|
|
title="Thé Tip Top"
|
|
subtitle="Administration"
|
|
/>
|
|
);
|
|
}
|