import { observer } from "mobx-react-lite"; import { Plus, PlusIcon } from "lucide-react"; // hooks import { useApplication, useProject } from "hooks/store"; // components import { EmptyState } from "components/common"; // assets import emptyIssue from "public/empty-state/issue.svg"; import emptyProject from "public/empty-state/project.svg"; export const GlobalViewEmptyState: React.FC = observer(() => { // store hooks const { commandPalette: { toggleCreateIssueModal, toggleCreateProjectModal }, eventTracker: { setTrackElement }, } = useApplication(); const { workspaceProjectIds } = useProject(); return (
{!workspaceProjectIds || workspaceProjectIds?.length === 0 ? ( , text: "New Project", onClick: () => { setTrackElement("ALL_ISSUES_EMPTY_STATE"); toggleCreateProjectModal(true); }, }} /> ) : ( , onClick: () => { setTrackElement("ALL_ISSUES_EMPTY_STATE"); toggleCreateIssueModal(true); }, }} /> )}
); });