import { useState } from "react"; import { useRouter } from "next/router"; 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, PhotoFilterIcon, Button } from "@plane/ui"; // helpers import { renderEmoji } from "helpers/emoji.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 { currentProjectDetails } = projectStore; return ( <> {workspaceSlug && projectId && ( setCreateViewModal(false)} workspaceSlug={workspaceSlug.toString()} projectId={projectId.toString()} /> )}
{renderEmoji(currentProjectDetails.emoji)} ) : currentProjectDetails?.icon_prop ? (
{renderEmoji(currentProjectDetails.icon_prop)}
) : ( {currentProjectDetails?.name.charAt(0)} ) } link={`/${workspaceSlug}/projects/${currentProjectDetails?.id}/issues`} /> } label="Views" />
); });