pesde/website/src/routes/+page.ts
2024-10-28 17:07:01 +01:00

10 lines
283 B
TypeScript

import { fetchRegistryJson, type SearchResponse } from "$lib/registry-api"
import type { PageLoad } from "./$types"
export const load: PageLoad = async ({ fetch }) => {
const { data: packages } = await fetchRegistryJson<SearchResponse>("search", fetch)
return {
packages,
}
}