Build user pages

This commit is contained in:
NeilClack
2026-02-25 13:19:26 -06:00
parent 12190d01dc
commit cc51f40591
53 changed files with 5204 additions and 4817 deletions
+15
View File
@@ -0,0 +1,15 @@
import type { LayoutServerLoad } from './$types';
import { prisma } from '$lib/db';
export const load: LayoutServerLoad = async ({ locals }) => {
if (!locals.user?.id) {
return { userRoleId: null };
}
const user = await prisma.user.findUnique({
where: { id: locals.user.id },
select: { roleId: true }
});
return { userRoleId: user?.roleId ?? null };
};