From 5106643a97bf0926cca4ec77602e7560917414bd Mon Sep 17 00:00:00 2001 From: Romulus21 Date: Fri, 6 Mar 2026 12:09:37 +0100 Subject: [PATCH] hide total --- .../js/components/rainfall/YearRainfaill.tsx | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) 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)}*/} + {/* )}*/} + {/**/}