import { observer } from "mobx-react"; import { Plus, PlusIcon } from "lucide-react"; // hooks import { EmptyState } from "@/components/common"; import { useCommandPalette, useEventTracker, useProject } from "@/hooks/store"; // components // 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 { toggleCreateIssueModal, toggleCreateProjectModal } = useCommandPalette(); const { setTrackElement } = useEventTracker(); 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); }, }} /> )}
); });