refactor: use common TagChip, switch to SSR for admin pages, better error & logger handling

This commit is contained in:
2026-01-14 11:44:46 -06:00
parent cba0cbb704
commit 08c5dcda3b
18 changed files with 831 additions and 408 deletions
@@ -0,0 +1,17 @@
import type { PageServerLoad } from "./$types";
import { apiFetch } from "$lib/api.server";
import { addIconsToTags } from "$lib/server/tag-icons";
import type { AdminTagWithCount } from "$lib/admin-types";
export const load: PageServerLoad = async ({ fetch }) => {
const tagsWithCounts = await apiFetch<AdminTagWithCount[]>("/api/tags", {
fetch,
});
// Add icons to tags
const availableTags = await addIconsToTags(tagsWithCounts);
return {
availableTags,
};
};