import type * as getPreferences from '#lib/lexicons/dev/knotless/getPreferences.ts'; import type { PageLoad } from './$types'; import { xrpc } from '#lib/data.ts'; import { notificationsOf } from '#lib/preferences.ts'; /** Which notifications the account hears of: none for no one, or from a server that keeps no index. */ export const load: PageLoad = async (event) => { const { me } = await event.parent(); if (!me) return { preferences: null }; const all = await xrpc( event, 'dev.knotless.getPreferences', {}, true ); return { preferences: all && notificationsOf(all) }; };