feat(#64): Improve the about page

This commit is contained in:
Josh Creek
2026-01-10 15:27:00 +00:00
parent 463ab88545
commit adc96baa90
12 changed files with 586 additions and 535 deletions
+17
View File
@@ -0,0 +1,17 @@
import type { PageServerLoad } from './$types';
/**
* Server-side load function for the homepage
*
* Fetches public statistics from the database and passes them to the page component.
* Stats are cached for 24 hours to improve performance.
*/
export const load: PageServerLoad = async ({ fetch }) => {
// Fetch stats from database
const statsResponse = await fetch('/api/stats');
const statsData = await statsResponse.json();
return {
stats: statsData.error ? null : statsData
};
};