import Link from "next/link"; import { useRouter } from "next/router"; import { Image, BrainCog, Cog, Lock, Mail } from "lucide-react"; // hooks import { Tooltip } from "@plane/ui"; import { useApplication } from "hooks/store"; // ui const INSTANCE_ADMIN_LINKS = [ { Icon: Cog, name: "General", description: "Identify your instances and get key details", href: `/god-mode`, }, { Icon: Mail, name: "Email", description: "Set up emails to your users", href: `/god-mode/email`, }, { Icon: Lock, name: "SSO and OAuth", description: "Configure your Google and GitHub SSOs", href: `/god-mode/authorization`, }, { Icon: BrainCog, name: "Artificial intelligence", description: "Configure your OpenAI creds", href: `/god-mode/ai`, }, { Icon: Image, name: "Images in Plane", description: "Allow third-party image libraries", href: `/god-mode/image`, }, ]; export const InstanceAdminSidebarMenu = () => { // store hooks const { theme: { sidebarCollapsed }, } = useApplication(); // 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} {item.description}
)}
); })}
); };