import { FC } from "react"; import { observer } from "mobx-react"; import { useRouter } from "next/router"; // ui import { Settings } from "lucide-react"; import { Breadcrumbs, CustomMenu } from "@plane/ui"; // components import { BreadcrumbLink, Logo } from "@/components/common"; // constants import { EUserProjectRoles, PROJECT_SETTINGS_LINKS } from "@/constants/project"; // hooks import { useProject, useUser } from "@/hooks/store"; export const ProjectSettingHeader: FC = observer(() => { // router const router = useRouter(); const { workspaceSlug, projectId } = router.query; // store hooks const { membership: { currentProjectRole }, } = useUser(); const { currentProjectDetails } = useProject(); if (currentProjectRole && currentProjectRole <= EUserProjectRoles.VIEWER) return null; return (
) } /> } />
} /> } />
Settings } placement="bottom-start" closeOnSelect > {PROJECT_SETTINGS_LINKS.map((item) => ( router.push(`/${workspaceSlug}/projects/${projectId}${item.href}`)} > {item.label} ))}
); });