feat: switch fetch function
This commit is contained in:
1 parent
bf63026108
commit
2035ee052a
10 files changed
+38
-29
No files matched your search
@@ -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'
|
||||
|
||||
Reference in new issue
Block a user