feat: implement loaders

This commit is contained in:
Norbert Maciaszek
2025-11-17 18:53:46 +01:00
parent cc3d3ced5a
commit baa0fcd7c5
4 changed files with 22 additions and 4 deletions

View File

@@ -0,0 +1,11 @@
import { DB } from '$lib/integrations/db';
export const LoaderYear = (year?: number) => {
year = year ?? new Date().getFullYear();
return () => DB.getYear(year);
};
export const LoaderYears = () => {
return () => DB.getYears();
};