import { FC } from "react"; import { observer } from "mobx-react"; import { useRouter } from "next/router"; // ui import { Breadcrumbs, CustomMenu } from "@plane/ui"; // helper import { BreadcrumbLink } from "@/components/common"; import { ProjectLogo } from "@/components/project"; import { EUserProjectRoles, PROJECT_SETTINGS_LINKS } from "@/constants/project"; // hooks import { useProject, useUser } from "@/hooks/store"; // constants // components export interface IProjectSettingHeader { title: string; } export const ProjectSettingHeader: FC = observer((props) => { const { title } = props; // 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 (
) } /> } />
} />
{title} } placement="bottom-start" closeOnSelect > {PROJECT_SETTINGS_LINKS.map((item) => ( router.push(`/${workspaceSlug}/projects/${projectId}${item.href}`)} > {item.label} ))}
); });