From f9c529bf5590d2ff21c6998d242bad73fc1ec932 Mon Sep 17 00:00:00 2001 From: ben_29 Date: Sun, 10 Dec 2023 19:02:32 +0800 Subject: [PATCH] fix: update the year when change by Title & City, otherwise the `SVG` will be displayed and the table will not be shown if the previous status is 'Total' --- src/pages/index.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pages/index.tsx b/src/pages/index.tsx index d38e78ae460..5368adb0f5c 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -48,6 +48,9 @@ const Index = () => { func: (_run: Activity, _value: string) => boolean ) => { scrollToMap(); + if(name != 'Year'){ + setYear(thisYear) + } setActivity(filterAndSortRuns(activities, item, func, sortDateFunc)); setRunIndex(-1); setTitle(`${item} ${name} Running Heatmap`);