import { FC } from "react"; // hooks import { useChart } from "../hooks"; // types import { IMonthBlock } from "../views"; export const MonthChartView: FC = () => { const { currentViewData, renderView } = useChart(); const monthBlocks: IMonthBlock[] = renderView; return ( <>
{monthBlocks && monthBlocks.length > 0 && monthBlocks.map((block, _idxRoot) => (
{block?.title}
{block?.children && block?.children.length > 0 && block?.children.map((monthDay, _idx) => (
{monthDay.dayData.shortTitle[0]} {" "} {monthDay.day}
))}
{block?.children && block?.children.length > 0 && block?.children.map((monthDay, _idx) => (
{/* {monthDay?.today && (
)} */}
))}
))}
); };