import { useState } from "react"; import { useRouter } from "next/router"; import Link from "next/link"; import { observer } from "mobx-react-lite"; import { Plus } from "lucide-react"; // mobx store import { useMobxStore } from "lib/mobx/store-provider"; // components import { CreateUpdateProjectViewModal } from "components/views"; // components import { Breadcrumbs, BreadcrumbItem } from "@plane/ui"; // ui import { PrimaryButton } from "components/ui"; // helpers import { truncateText } from "helpers/string.helper"; export const ProjectViewsHeader: React.FC = observer(() => { // router const router = useRouter(); const { workspaceSlug, projectId } = router.query; // states const [createViewModal, setCreateViewModal] = useState(false); const { project: projectStore } = useMobxStore(); const projectDetails = workspaceSlug && projectId ? projectStore.getProjectById(workspaceSlug.toString(), projectId.toString()) : undefined; return ( <> {workspaceSlug && projectId && ( setCreateViewModal(false)} workspaceSlug={workspaceSlug.toString()} projectId={projectId.toString()} /> )}
router.back()}>

Projects

} />
setCreateViewModal(true)}> Create View
); });