Skip to content

Commit

Permalink
format, fixed await
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugos68 committed Jan 14, 2025
1 parent 2dbd0fa commit 11bd92d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions sites/floating-ui-svelte.vercel.app/src/routes/+layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,20 @@ async function getPageFind() {
}

async function getLatestVersion(fetcher: typeof fetch) {
const response = await fetcher("https://registry.npmjs.org/@skeletonlabs/floating-ui-svelte");
const response = await fetcher(
"https://registry.npmjs.org/@skeletonlabs/floating-ui-svelte",
);
const data = await response.json();
const version = data["dist-tags"].latest;
const version = data["dist-tags"].latest as string;
return version;
}

export async function load({ fetch }) {
const version = getLatestVersion(fetch);
const version = await getLatestVersion(fetch);
const pagefind = await getPageFind();
return {
version: version,
pagefind: pagefind
pagefind: pagefind,
};
}

Expand Down

0 comments on commit 11bd92d

Please sign in to comment.