import { observer } from "mobx-react-lite"; import { useRouter } from "next/router"; import { Plus } from "lucide-react"; // hooks // components import { Breadcrumbs, PhotoFilterIcon, Button } from "@plane/ui"; import { BreadcrumbLink } from "components/common"; import { SidebarHamburgerToggle } from "components/core/sidebar/sidebar-menu-hamburger-toggle"; // helpers import { EUserProjectRoles } from "constants/project"; // constants import { useApplication, useProject, useUser } from "hooks/store"; import { ProjectLogo } from "components/project"; export const ProjectViewsHeader: React.FC = observer(() => { // router const router = useRouter(); const { workspaceSlug } = router.query; // store hooks const { commandPalette: { toggleCreateViewModal }, } = useApplication(); const { membership: { currentProjectRole }, } = useUser(); const { currentProjectDetails } = useProject(); const canUserCreateIssue = currentProjectRole && [EUserProjectRoles.ADMIN, EUserProjectRoles.MEMBER].includes(currentProjectRole); return ( <>
) } /> } /> } /> } />
{canUserCreateIssue && (
)}
); });