atmo.rsvp
1import type { LayoutServerLoad } from './$types';
2import { loadProfile } from '$lib/atproto/server/profile';
3
4export const load: LayoutServerLoad = async ({ locals, platform }) => {
5 if (!locals.did || !locals.client) {
6 return { did: null, profile: null };
7 }
8
9 const profile = await loadProfile(locals.did, platform!.env.DB);
10
11 return {
12 did: locals.did,
13 profile
14 };
15};