import { observer } from "mobx-react-lite"; import { PlusIcon } from "lucide-react"; // mobx store import { useMobxStore } from "lib/mobx/store-provider"; // components import { NewEmptyState } from "components/common/new-empty-state"; // constants import { EUserWorkspaceRoles } from "constants/workspace"; // assets import emptyIssue from "public/empty-state/empty_issues.webp"; import { EProjectStore } from "store/command-palette.store"; export const ProjectEmptyState: React.FC = observer(() => { const { commandPalette: commandPaletteStore, trackEvent: { setTrackElement }, user: { currentProjectRole }, } = useMobxStore(); const isEditingAllowed = !!currentProjectRole && currentProjectRole >= EUserWorkspaceRoles.MEMBER; return (
, onClick: () => { setTrackElement("PROJECT_EMPTY_STATE"); commandPaletteStore.toggleCreateIssueModal(true, EProjectStore.PROJECT); }, } : null } disabled={!isEditingAllowed} />
); });