import { listMyBookmarks } from '$lib/api/bookmarks'; import { ApiError } from '$lib/api/client'; import type { PageLoad } from './$types'; export const ssr = false; export const load: PageLoad = async () => { try { const page = await listMyBookmarks(); return { bookmarks: page.items, authenticated: true }; } catch (e) { if (e instanceof ApiError && e.status === 401) { return { bookmarks: [], authenticated: false }; } throw e; } };