"use client"; import { observer } from "mobx-react"; import { useParams, useSearchParams } from "next/navigation"; // components import { PageHead } from "@/components/core"; import { EmptyState } from "@/components/empty-state"; import { InboxIssueRoot } from "@/components/inbox"; // constants import { EmptyStateType } from "@/constants/empty-state"; // helpers import { EInboxIssueCurrentTab } from "@/helpers/inbox.helper"; // hooks import { useProject } from "@/hooks/store"; const ProjectInboxPage = observer(() => { /// router const { workspaceSlug, projectId } = useParams(); const searchParams = useSearchParams(); const navigationTab = searchParams.get("currentTab"); const inboxIssueId = searchParams.get("inboxIssueId"); // hooks const { currentProjectDetails } = useProject(); // No access to inbox if (currentProjectDetails?.inbox_view === false) return (
); // derived values const pageTitle = currentProjectDetails?.name ? `${currentProjectDetails?.name} - Inbox` : "Plane - Inbox"; const currentNavigationTab = navigationTab ? navigationTab === "open" ? EInboxIssueCurrentTab.OPEN : EInboxIssueCurrentTab.CLOSED : undefined; if (!workspaceSlug || !projectId) return <>; return (
); }); export default ProjectInboxPage;