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
@@ -5,13 +5,13 @@ import { get } from 'svelte/store'
type InboxFeedType = 'replies' | 'mentions' | 'messages' | 'all'
export async function load({ url }) {
export async function load({ url, fetch }) {
const auth = get(profile)
if (!auth?.jwt) return
const type: InboxFeedType =
(url.searchParams.get('type') as InboxFeedType) || 'all'
const client = getClient()
const client = getClient(undefined, fetch)
const page = Number(url.searchParams.get('page')) || 1
const unreadOnly: boolean =
(url.searchParams.get('unreadOnly') || 'true') == 'true'