import { observer } from "mobx-react"; import { Expand, Shrink } from "lucide-react"; // hooks // helpers import { VIEWS_LIST } from "@/components/gantt-chart/data"; import { cn } from "@/helpers/common.helper"; // types import { useGanttChart } from "../hooks/use-gantt-chart"; import { TGanttViews } from "../types"; // constants type Props = { blockIds: string[]; fullScreenMode: boolean; handleChartView: (view: TGanttViews) => void; handleToday: () => void; loaderTitle: string; toggleFullScreenMode: () => void; }; export const GanttChartHeader: React.FC = observer((props) => { const { blockIds, fullScreenMode, handleChartView, handleToday, loaderTitle, toggleFullScreenMode } = props; // chart hook const { currentView } = useGanttChart(); return (
{blockIds ? `${blockIds.length} ${loaderTitle}` : "Loading..."}
{VIEWS_LIST.map((chartView: any) => (
handleChartView(chartView?.key)} > {chartView?.title}
))}
); });