Skip to content

Commit

Permalink
fix: update the year when change by Title & City, otherwise the SVG
Browse files Browse the repository at this point in the history
… will be displayed and the table will not be shown if the previous status is 'Total'
  • Loading branch information
ben-29 committed Dec 10, 2023
1 parent 71705f0 commit f9c529b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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`);
Expand Down

0 comments on commit f9c529b

Please sign in to comment.