Split the library page into song, album and upload routes with linked tabs

This commit is contained in:
2026-09-25 01:11:01 +02:00
parent 9928840577
commit 797bed8e7d
20 changed files with 351 additions and 279 deletions
@@ -0,0 +1,10 @@
import type { PageServerLoad } from './$types';
import { apiFor } from '$lib/server/api';
import { requireUser } from '$lib/server/guards';
import { loadUserAlbums } from '$lib/server/albums';
export const load: PageServerLoad = async ({ locals, url, fetch }) => {
const user = requireUser(locals, url);
const api = apiFor({ fetch, locals });
return { albums: await loadUserAlbums(api, user.sub) };
};