import { FC, Fragment, ReactNode, useMemo } from "react"; import Link from "next/link"; import { Briefcase, CheckCircle, ChevronRight } from "lucide-react"; // hooks import { useProject } from "hooks/store"; // types import { TViewTypes } from "@plane/types"; type TViewHeader = { projectId: string | undefined; viewType: TViewTypes; titleIcon: ReactNode; title: string; workspaceViewTabOptions: { key: TViewTypes; title: string; href: string }[]; }; export const ViewHeader: FC = (props) => { const { projectId, viewType, titleIcon, title, workspaceViewTabOptions } = props; // hooks const { getProjectById } = useProject(); const projectDetails = useMemo( () => (projectId ? getProjectById(projectId) : undefined), [projectId, getProjectById] ); return (
{projectDetails && (
{projectDetails?.icon_prop ? projectDetails?.icon_prop.toString() : }
{projectDetails?.name ? projectDetails?.name : "Project Issues"}
)}
{titleIcon ? titleIcon : }
{title ? title : "All Issues"}
{workspaceViewTabOptions.map((tab) => ( {tab.title} ))}
); };