adds profile page

This commit is contained in:
Christian Beutel
2024-12-08 21:05:35 +01:00
parent 2d376331eb
commit 254e053bd9
26 changed files with 1243 additions and 838 deletions

View File

@@ -0,0 +1,15 @@
import { users_show } from "$lib/stores/user_store";
import { error, type ServerLoad } from "@sveltejs/kit";
export const load: ServerLoad = async ({ params, locals, fetch }) => {
if(!params.id) {
error(404, "Not found")
}
const user = await users_show(params.id, fetch);
const isOwnProfile = params.id === locals.user?.id;
return { user, isOwnProfile }
};