diff --git a/resources/js/components/rainfall/YearRainfaill.tsx b/resources/js/components/rainfall/YearRainfaill.tsx index 401211a..3bd7a6e 100644 --- a/resources/js/components/rainfall/YearRainfaill.tsx +++ b/resources/js/components/rainfall/YearRainfaill.tsx @@ -46,23 +46,23 @@ const YearRainfall: FC = ({loadedAt}) => { {months.find(m => m.year === ((new Date).getFullYear() - 1) && m.month === Number(month))?.values} )} - - Total - {Object.entries(data).at(0).at(1).map(i => i.year) - .sort((a,b) => b > a) - .map(year => - {Object.entries(data).reduce((acc, item) => { - console.log(item.at(1), year) - item.at(1).forEach(month => { - console.log(month) - if(month.year === year) { - acc += month.values - } - }) - return acc - }, 0)} - )} - + {/**/} + {/* Total*/} + {/* {Object.entries(data).at(0).at(1).map(i => i.year)*/} + {/* .sort((a,b) => b > a)*/} + {/* .map(year => */} + {/* {Object.entries(data).reduce((acc, item) => {*/} + {/* console.log(item.at(1), year)*/} + {/* item.at(1).forEach(month => {*/} + {/* console.log(month)*/} + {/* if(month.year === year) {*/} + {/* acc += month.values*/} + {/* }*/} + {/* })*/} + {/* return acc*/} + {/* }, 0)}*/} + {/* )}*/} + {/**/}