fix(website): use provided fetch instead of global

This commit is contained in:
LukaDev 2024-09-29 17:53:59 +02:00
parent 974d140da6
commit 75dc6aa115
2 changed files with 2 additions and 2 deletions

View file

@ -29,7 +29,7 @@ const fetchPackage = async (fetcher: typeof fetch, options: FetchPackageOptions)
}
}
export const load: LayoutLoad = async ({ params }) => {
export const load: LayoutLoad = async ({ params, fetch }) => {
const { scope, name, version, target } = params
if (version !== undefined && target === undefined) {

View file

@ -37,7 +37,7 @@ const fetchReadme = async (
}
}
export const load: PageLoad = async ({ parent }) => {
export const load: PageLoad = async ({ parent, fetch }) => {
const { pkg } = await parent()
const { name, version, targets } = pkg