import Link from "next/link"; import { useRouter } from "next/router"; import { BarChart2, Briefcase, CheckCircle, LayoutGrid } from "lucide-react"; // mobx store import { useMobxStore } from "lib/mobx/store-provider"; // ui import { Tooltip } from "@plane/ui"; const INSTANCE_ADMIN_LINKS = [ { Icon: LayoutGrid, name: "General", href: `/admin`, }, { Icon: BarChart2, name: "OAuth", href: `/admin/oauth`, }, { Icon: Briefcase, name: "Email", href: `/admin/email`, }, { Icon: CheckCircle, name: "AI", href: `/admin/ai`, }, ]; export const InstanceAdminSidebarMenu = () => { const { theme: { sidebarCollapsed }, } = useMobxStore(); // router const router = useRouter(); return (
{INSTANCE_ADMIN_LINKS.map((item, index) => { const isActive = item.name === "Settings" ? router.asPath.includes(item.href) : router.asPath === item.href; return (
{} {!sidebarCollapsed && item.name}
); })}
); };