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 { ProjectViewsHeader } from "@/components/headers"; import { ProjectViewsList } from "@/components/views"; // 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 ProjectViewsPage: NextPageWithLayout = observer(() => { // router const router = useRouter(); const { workspaceSlug, projectId } = router.query; // store const { getProjectById, currentProjectDetails } = useProject(); // derived values const project = projectId ? getProjectById(projectId.toString()) : undefined; const pageTitle = project?.name ? `${project?.name} - Views` : undefined; if (!workspaceSlug || !projectId) return <>>; // No access to if (currentProjectDetails?.issue_views_view === false) return (