2023-11-08 08:21:55 +00:00
|
|
|
import { observer } from "mobx-react-lite";
|
2023-10-30 14:39:04 +00:00
|
|
|
import { PlusIcon } from "lucide-react";
|
2023-11-08 08:21:55 +00:00
|
|
|
// mobx store
|
|
|
|
import { useMobxStore } from "lib/mobx/store-provider";
|
2023-10-30 14:39:04 +00:00
|
|
|
// components
|
|
|
|
import { EmptyState } from "components/common";
|
|
|
|
// assets
|
|
|
|
import emptyIssue from "public/empty-state/issue.svg";
|
2023-11-27 08:45:33 +00:00
|
|
|
import { EProjectStore } from "store/command-palette.store";
|
|
|
|
import { useRouter } from "next/router";
|
2023-10-30 14:39:04 +00:00
|
|
|
|
2023-11-08 08:21:55 +00:00
|
|
|
export const ProjectViewEmptyState: React.FC = observer(() => {
|
2023-11-27 08:45:33 +00:00
|
|
|
const router = useRouter();
|
|
|
|
const { viewId } = router.query as { viewId: string };
|
|
|
|
|
|
|
|
const {
|
|
|
|
commandPalette: commandPaletteStore,
|
|
|
|
trackEvent: { setTrackElement },
|
|
|
|
} = useMobxStore();
|
2023-11-08 08:21:55 +00:00
|
|
|
|
|
|
|
return (
|
|
|
|
<div className="h-full w-full grid place-items-center">
|
|
|
|
<EmptyState
|
|
|
|
title="View issues will appear here"
|
|
|
|
description="Issues help you track individual pieces of work. With Issues, keep track of what's going on, who is working on it, and what's done."
|
|
|
|
image={emptyIssue}
|
|
|
|
primaryButton={{
|
|
|
|
text: "New issue",
|
|
|
|
icon: <PlusIcon className="h-3 w-3" strokeWidth={2} />,
|
2023-11-25 15:56:26 +00:00
|
|
|
onClick: () => {
|
|
|
|
setTrackElement("VIEW_EMPTY_STATE");
|
2023-11-27 08:45:33 +00:00
|
|
|
commandPaletteStore.toggleCreateIssueModal(true, EProjectStore.PROJECT_VIEW);
|
|
|
|
},
|
2023-11-08 08:21:55 +00:00
|
|
|
}}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
});
|