Login and dashboard added

This commit is contained in:
2026-07-13 16:09:15 +01:00
commit ca40bd4095
36 changed files with 7821 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
"use client";
import Link from "next/link";
import { useState } from "react";
import { ChevronDown } from "lucide-react";
import {Props} from "@/constants/types";
export default function SidebarItem({ item }: Props) {
const [open, setOpen] = useState(item.title === "Overview");
return (
<div className="border-b border-slate-800">
<button
onClick={() => setOpen(!open)}
className="flex w-full items-center justify-between px-5 py-4 hover:bg-slate-900"
>
<div className="flex items-center gap-3">
<item.icon size={20} />
<span className="font-medium">{item.title}</span>
</div>
<ChevronDown
size={18}
className={`transition-transform ${
open ? "rotate-180" : ""
}`}
/>
</button>
{open && item.children.length > 0 && (
<div className="ml-8 border-l border-slate-700 pl-5 pb-3">
{item.children.map((child: any) => (
<Link
key={child.title}
href={child.href}
className="group mt-2 flex items-center gap-3 rounded-lg px-3 py-2 text-slate-300 hover:bg-teal-500/20 hover:text-teal-400"
>
<child.icon size={18} />
<span>{child.title}</span>
</Link>
))}
</div>
)}
</div>
);
}