import { observer } from "mobx-react-lite"; import { Plus, PlusIcon } from "lucide-react"; // hooks import { EmptyState } from "@/components/common"; import { useApplication, 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 { commandPalette: { toggleCreateIssueModal, toggleCreateProjectModal }, } = useApplication(); 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); }, }} /> )}
); });