import { FC } from "react"; // hooks import { useChart } from "components/gantt-chart"; // helpers import { cn } from "helpers/common.helper"; // types import { IMonthBlock } from "../../views"; // constants import { HEADER_HEIGHT, SIDEBAR_WIDTH } from "components/gantt-chart/constants"; export const MonthChartView: FC = () => { // chart hook const { currentViewData, renderView } = useChart(); 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) && (
)}
))}
))}
); };