import type * as getActorRepos from '#lib/lexicons/dev/knotless/getActorRepos.ts'; import type * as listBlocks from '#lib/lexicons/dev/knotless/listBlocks.ts'; import type { PageLoad } from './$types'; import { xrpc } from '#lib/data.ts'; /** Whom the account blocks, and its public repositories, one of which a block can name: none for no one. */ export const load: PageLoad = async (event) => { const { me } = await event.parent(); if (!me) return { blocks: null, repos: [] }; const [blocks, { repos }] = await Promise.all([ xrpc(event, 'dev.knotless.listBlocks', {}), xrpc(event, 'dev.knotless.getActorRepos', { actor: me.did }) ]); return { blocks: blocks.blocks, repos: repos.filter((r) => !r.private) }; };