import { ReactElement } from "react"; import { observer } from "mobx-react"; import { useRouter } from "next/router"; // components import { PageHead } from "@/components/core"; import { EmptyState } from "@/components/empty-state"; import { ProjectInboxHeader } from "@/components/headers"; import { InboxIssueRoot } from "@/components/inbox"; // constants import { EmptyStateType } from "@/constants/empty-state"; // hooks import { useProject } from "@/hooks/store"; // layouts import { AppLayout } from "@/layouts/app-layout"; // types import { NextPageWithLayout } from "@/lib/types"; const ProjectInboxPage: NextPageWithLayout = observer(() => { /// router const router = useRouter(); const { workspaceSlug, projectId, inboxIssueId } = router.query; // hooks const { currentProjectDetails } = useProject(); if (!workspaceSlug || !projectId) return <>; // No access to inbox if (currentProjectDetails?.inbox_view === false) return (
); // derived values const pageTitle = currentProjectDetails?.name ? `${currentProjectDetails?.name} - Inbox` : "Plane - Inbox"; return (
); }); ProjectInboxPage.getLayout = function getLayout(page: ReactElement) { return ( } withProjectWrapper> {page} ); }; export default ProjectInboxPage;