diff --git a/src/pages/statistics/ChartContainer.tsx b/src/pages/statistics/ChartContainer.tsx index da77768..4f6c349 100644 --- a/src/pages/statistics/ChartContainer.tsx +++ b/src/pages/statistics/ChartContainer.tsx @@ -455,9 +455,7 @@ const ChartContainer = () => { } setCategorySum( () => - (subCategoryData - ? categoryDetailData - : statisticsResult + (subCategoryData ?? statisticsResult )?.reduce( (accu: number, curr: StatisticsDetail) => accu + curr.timeSum, @@ -483,23 +481,6 @@ const ChartContainer = () => { > {data.categoryName} - - sx={{ - fontSize: '16px', - lineHeight: '18.75px', - fontWeight: 700, - m: 0, - p: 0, - }} - > - {data.categoryName} - { statisticsResult = statisticsResult.length ? statisticsResult : []; }, []); - useEffect(() => { - const timeSum = statisticsResult.length - ? statisticsResult.reduce( - (accumulator, currentValue) => accumulator + currentValue.timeSum, - 0, - ) - : 0; - setTotalSum(() => timeSum); - // setCategorySum(() => 0); - }, [totalSumTitle]); - useEffect(() => { const timeSum = statisticsResult.length ? statisticsResult.reduce(