import { FC } from "react"; // context import { useChart } from "../hooks"; import { IYearBlock } from "../views"; export const YearChartView: FC = () => { const { currentViewData, renderView } = useChart(); const yearBlocks: IYearBlock[] = renderView; console.log("yearBlocks", yearBlocks); return ( <>
{yearBlocks && yearBlocks.length > 0 && yearBlocks.map((block, _idxRoot) => (
{block?.title}
{block?.children && block.children.length > 0 && block.children.map((monthWeek, _idx: any) => (
{monthWeek.date.getDate()}
))}
{block.children && block.children.length > 0 && block.children.map((monthWeek, _idx) => (
{/* {monthDay?.today && (
)} */}
))}
))}
); };