home page converted back to server-side component
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user