import { useRouter } from "next/router"; import { observer } from "mobx-react-lite"; import { Plus } from "lucide-react"; // hooks import { useApplication, useProject, useUser } from "hooks/store"; import useLocalStorage from "hooks/use-local-storage"; // ui import { Breadcrumbs, Button, Tooltip, DiceIcon } from "@plane/ui"; // helper import { renderEmoji } from "helpers/emoji.helper"; // constants import { MODULE_VIEW_LAYOUTS } from "constants/module"; import { EUserProjectRoles } from "constants/project"; export const ModulesListHeader: React.FC = observer(() => { // router const router = useRouter(); const { workspaceSlug } = router.query; // store hooks const { commandPalette: commandPaletteStore } = useApplication(); const { membership: { currentProjectRole }, } = useUser(); const { currentProjectDetails } = useProject(); const { storedValue: modulesView, setValue: setModulesView } = useLocalStorage("modules_view", "grid"); const canUserCreateModule = currentProjectRole && [EUserProjectRoles.ADMIN, EUserProjectRoles.MEMBER].includes(currentProjectRole); return (