update homepage draft and other pages

This commit is contained in:
2026-08-29 11:38:16 +00:00
parent 6452331ee7
commit 97ff9852cd
38 changed files with 2185 additions and 111 deletions

View File

@@ -0,0 +1,20 @@
import { db } from '$lib/db';
import type { PageServerLoad } from './$types';
export const load: PageServerLoad = async () => {
const topics = await db.query.topics.findMany({
with: {
topicsToTasks: {
with: {
task: true
}
}
}
});
topics.sort((a, b) => b.topicsToTasks.length - a.topicsToTasks.length);
return {
topics
};
};