feat: switch fetch function

This commit is contained in:
Xyphyn committed 2023-08-04 15:08:44 -07:00
1 parent bf63026108
commit 2035ee052a
10 files changed
+38 -29

No files matched your search

+2 -2
View File
@@ -11,11 +11,11 @@ function getSavedItemPublished(item: PostView | CommentView) {
}
}
export async function load({ url }) {
export async function load({ url, fetch }) {
if (!get(profile)) return { posts: [] }
const page = Number(url.searchParams.get('page')) || 1
const client = getClient()
const client = getClient(undefined, fetch)
const [posts, comments] = await Promise.all([
client.getPosts({