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:
2025-08-11 10:10:45 +02:00
parent 02a3023f7a
commit eef93528e3

View File

@@ -32,7 +32,7 @@ export const HomePage:FC<HomePageProps> = async ({ searchParams }) => {
return (<MonthLocationList />); return (<MonthLocationList />);
} }
const currentYear = Number(searchParams?.year) || availableYears[0]; const currentYear = Number(searchParams?.year) || new Date().getFullYear();
const locations = await fetchAllLocations(currentYear); const locations = await fetchAllLocations(currentYear);