import { FC } from "react"; import { observer } from "mobx-react"; // hooks import { HEADER_HEIGHT, SIDEBAR_WIDTH } from "@/components/gantt-chart/constants"; import { useGanttChart } from "@/components/gantt-chart/hooks/use-gantt-chart"; // helpers import { cn } from "@/helpers/common.helper"; // types import { IMonthBlock } from "../../views"; // constants export const MonthChartView: FC = observer(() => { // chart hook const { currentViewData, renderView } = useGanttChart(); const monthBlocks: IMonthBlock[] = renderView; return (
{monthBlocks?.map((block, rootIndex) => (
{block?.title}
{block?.children?.map((monthDay, index) => (
{monthDay.dayData.shortTitle[0]}{" "} {monthDay.day}
))}
{block?.children?.map((monthDay, index) => (
{["sat", "sun"].includes(monthDay?.dayData?.shortTitle) && (
)}
))}
))}
); });