set current year as default active year
Changes default year from first available year in database to current year (Date.now) when no year parameter is provided in URL. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -32,7 +32,7 @@ export const HomePage:FC<HomePageProps> = async ({ searchParams }) => {
|
||||
return (<MonthLocationList />);
|
||||
}
|
||||
|
||||
const currentYear = Number(searchParams?.year) || availableYears[0];
|
||||
const currentYear = Number(searchParams?.year) || new Date().getFullYear();
|
||||
|
||||
const locations = await fetchAllLocations(currentYear);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user