import React, { useState } from "react"; // next import Link from "next/link"; import { useRouter } from "next/router"; import Image from "next/image"; // services import userService from "lib/services/user.service"; import authenticationService from "lib/services/authentication.service"; // hooks import useUser from "lib/hooks/useUser"; import useTheme from "lib/hooks/useTheme"; // components import CreateProjectModal from "components/project/CreateProjectModal"; // headless ui import { Dialog, Disclosure, Menu, Transition } from "@headlessui/react"; // icons import { ArrowPathIcon, Bars3Icon, ChevronDownIcon, Cog6ToothIcon, HomeIcon, ClipboardDocumentListIcon, PlusIcon, RectangleStackIcon, UserGroupIcon, UserIcon, XMarkIcon, ArrowLongLeftIcon, QuestionMarkCircleIcon, } from "@heroicons/react/24/outline"; // constants import { classNames } from "constants/common"; // ui import { Spinner, Tooltip } from "ui"; // types import type { IUser } from "types"; const navigation = (projectId: string) => [ { name: "Issues", href: `/projects/${projectId}/issues`, icon: RectangleStackIcon, }, { name: "Cycles", href: `/projects/${projectId}/cycles`, icon: ArrowPathIcon, }, { name: "Members", href: `/projects/${projectId}/members`, icon: UserGroupIcon, }, { name: "Settings", href: `/projects/${projectId}/settings`, icon: Cog6ToothIcon, }, ]; const navLinks = [ { icon: HomeIcon, name: "Home", href: `/workspace`, }, { icon: ClipboardDocumentListIcon, name: "Projects", href: "/projects", }, { icon: RectangleStackIcon, name: "My Issues", href: "/me/my-issues", }, { icon: UserGroupIcon, name: "Members", href: "/workspace/members", }, // { // icon: InboxIcon, // name: "Inbox", // href: "#", // }, { icon: Cog6ToothIcon, name: "Settings", href: "/workspace/settings", }, ]; const userLinks = [ { name: "My Profile", href: "/me/profile", }, { name: "Workspace Invites", href: "/invitations", }, ]; const Sidebar: React.FC = () => { const [sidebarOpen, setSidebarOpen] = useState(false); const [isCreateProjectModal, setCreateProjectModal] = useState(false); const router = useRouter(); const { projects, user } = useUser(); const { projectId } = router.query; const { workspaces, activeWorkspace, mutateUser } = useUser(); const { collapsed: sidebarCollapse, toggleCollapsed } = useTheme(); return ( ); }; export default Sidebar;