import { observer } from "mobx-react-lite"; import { useRouter } from "next/router"; // icons import { Plus } from "lucide-react"; // ui import { Breadcrumbs, Button, DiceIcon } from "@plane/ui"; // components import { BreadcrumbLink } from "@/components/common"; import { ProjectLogo } from "@/components/project"; // constants import { EUserProjectRoles } from "@/constants/project"; // hooks import { useApplication, useEventTracker, useProject, useUser } from "@/hooks/store"; export const ModulesListHeader: React.FC = observer(() => { // router const router = useRouter(); const { workspaceSlug } = router.query; // store hooks const { commandPalette: commandPaletteStore } = useApplication(); const { setTrackElement } = useEventTracker(); const { membership: { currentProjectRole }, } = useUser(); const { currentProjectDetails } = useProject(); // auth const canUserCreateModule = currentProjectRole && [EUserProjectRoles.ADMIN, EUserProjectRoles.MEMBER].includes(currentProjectRole); return (
) } /> } /> } />} />
{canUserCreateModule && ( )}
); });