home page converted back to server-side component

This commit is contained in:
2024-02-09 09:40:43 +01:00
parent 960210cbc3
commit 27b696faab
5 changed files with 70 additions and 117 deletions

View File

@@ -63,10 +63,10 @@ export const MonthLocationList:React.FC<MonthLocationListProps > = ({
const handleMonthToggle = (yearMonth:YearMonth) => {
// if the month is already expanded, collapse it
if(expandedMonth === yearMonth.month) {
router.push(`/?year=${yearMonth.year}`);
// router.push(`/?year=${yearMonth.year}`);
setExpandedMonth(-1); // no month is expanded
} else {
router.push(`/?year=${yearMonth.year}&month=${yearMonth.month}`);
// router.push(`/?year=${yearMonth.year}&month=${yearMonth.month}`);
setExpandedMonth(yearMonth.month);
}
}