johnandersen777.bsky.social/knotless
git that lives in your Atmosphere account
Forked from chadtmiller.com/knotless
0
0
import type * as listItems from '#lib/lexicons/dev/knotless/listItems.ts';
import type { PageLoad } from './$types';
import { repoPage } from '#lib/data.ts';
import { closed } from '#lib/query.ts';
export const load: PageLoad = async (event) => {
const p = event.url.searchParams;
const q = p.get('q') ?? '';
const state = closed(q, p.get('state')) ? 'closed' : undefined;
const params = { kind: 'issue', state, q: q || undefined, cursor: p.get('cursor') ?? undefined };
const { repo, answer } = await repoPage<typeof listItems.main>(
event,
'dev.knotless.listItems',
params
);
return { repo, items: answer, open: !state, q };
};