2026-04-17 09:26:44 +00:00
|
|
|
"use client"
|
2026-04-15 23:38:26 +00:00
|
|
|
import {
|
|
|
|
|
Sidebar,
|
|
|
|
|
SidebarContent,
|
|
|
|
|
SidebarFooter,
|
|
|
|
|
SidebarGroup,
|
|
|
|
|
SidebarHeader,
|
|
|
|
|
SidebarTrigger,
|
|
|
|
|
} from "@/components/ui/sidebar"
|
|
|
|
|
import Link from "next/link"
|
|
|
|
|
import { ManagementIcon, UploadAccount } from "../icons"
|
|
|
|
|
import Image from "next/image"
|
2026-04-17 09:26:44 +00:00
|
|
|
import { usePathname } from "next/navigation"
|
|
|
|
|
|
|
|
|
|
const menu = [
|
|
|
|
|
{
|
|
|
|
|
title: "account-management",
|
|
|
|
|
icon: <ManagementIcon className="h-5 w-5 shrink-0" />,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "upload-account-data",
|
|
|
|
|
icon: <UploadAccount className="h-5 w-5 shrink-0" />,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "spesific-target",
|
|
|
|
|
icon: <UploadAccount className="h-5 w-5 shrink-0" />,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "spesific-target-mapping",
|
|
|
|
|
icon: <UploadAccount className="h-5 w-5 shrink-0" />,
|
|
|
|
|
},
|
|
|
|
|
]
|
2026-04-15 23:38:26 +00:00
|
|
|
|
|
|
|
|
export function AppSidebar() {
|
2026-04-17 09:26:44 +00:00
|
|
|
const pathname = usePathname()
|
2026-04-15 23:38:26 +00:00
|
|
|
return (
|
2026-04-17 09:26:44 +00:00
|
|
|
<Sidebar collapsible="icon">
|
|
|
|
|
<div className="bg-gray-60 h-full border-2 border-violet-300 text-black">
|
2026-04-15 23:38:26 +00:00
|
|
|
{/* TRIGGER */}
|
|
|
|
|
<div className="absolute top-4 right-4 z-10 transition-all duration-300 group-data-[state=collapsed]:right-auto group-data-[state=collapsed]:left-1/2 group-data-[state=collapsed]:-translate-x-1/2">
|
|
|
|
|
<SidebarTrigger className="rounded-md p-2 transition hover:bg-white/10" />
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{/* LOGO */}
|
|
|
|
|
<div className="flex justify-center pt-16 transition-all duration-300 group-data-[state=collapsed]:pt-14">
|
2026-04-17 09:26:44 +00:00
|
|
|
{/* <Image
|
2026-04-15 23:38:26 +00:00
|
|
|
src="/multipool-logo.png"
|
|
|
|
|
loading="eager"
|
|
|
|
|
alt="logo"
|
|
|
|
|
width={240}
|
|
|
|
|
height={240}
|
|
|
|
|
className="transition-all duration-300 group-data-[state=collapsed]:h-6 group-data-[state=collapsed]:w-6"
|
2026-04-17 09:26:44 +00:00
|
|
|
/> */}
|
|
|
|
|
<div className="h-24 w-24 bg-gray-500"></div>
|
2026-04-15 23:38:26 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<SidebarHeader />
|
|
|
|
|
|
|
|
|
|
{/* MENU */}
|
|
|
|
|
<SidebarContent className="mt-10">
|
|
|
|
|
<SidebarGroup className="flex flex-col items-stretch space-y-2 px-2">
|
2026-04-17 09:26:44 +00:00
|
|
|
{menu.map((item) => (
|
|
|
|
|
<Link
|
|
|
|
|
key={item.title}
|
|
|
|
|
href={"/dashboard/" + item.title}
|
2026-04-17 11:18:39 +00:00
|
|
|
className={`flex w-full items-center justify-start gap-3 rounded-lg p-3 text-sm ${pathname.split("/")[2] == item.title ? "border-2 border-violet-600 bg-violet-100 font-bold text-violet-600" : "text-gray-600"} transition group-data-[state=collapsed]:justify-center hover:bg-white/10`}
|
2026-04-17 09:26:44 +00:00
|
|
|
>
|
|
|
|
|
{item.icon}
|
|
|
|
|
<span className="capitalize group-data-[state=collapsed]:hidden">
|
|
|
|
|
{item.title.split("-").join(" ")}
|
|
|
|
|
</span>
|
|
|
|
|
</Link>
|
|
|
|
|
))}
|
2026-04-15 23:38:26 +00:00
|
|
|
|
2026-04-17 09:26:44 +00:00
|
|
|
{/* <Link
|
2026-04-15 23:38:26 +00:00
|
|
|
href="/dashboard/upload-account-data"
|
|
|
|
|
className="flex w-full items-center justify-start gap-3 rounded-lg p-3 transition group-data-[state=collapsed]:justify-center hover:bg-white/10"
|
|
|
|
|
>
|
|
|
|
|
<UploadAccount className="h-5 w-5 shrink-0" />
|
|
|
|
|
<span className="group-data-[state=collapsed]:hidden">
|
|
|
|
|
Upload Account Data
|
|
|
|
|
</span>
|
2026-04-17 09:26:44 +00:00
|
|
|
</Link> */}
|
2026-04-15 23:38:26 +00:00
|
|
|
</SidebarGroup>
|
|
|
|
|
</SidebarContent>
|
|
|
|
|
|
|
|
|
|
<SidebarFooter />
|
|
|
|
|
</div>
|
|
|
|
|
</Sidebar>
|
|
|
|
|
)
|
|
|
|
|
}
|