feat: add media list
This commit is contained in:
1 parent
0a6310380f
commit
29bfa9104a
7 files changed
+200
-6
No files matched your search
@@ -0,0 +1,16 @@
|
||||
import { profile } from '$lib/auth.js'
|
||||
import { client } from '$lib/lemmy.js'
|
||||
import { get } from 'svelte/store'
|
||||
|
||||
export async function load({ fetch, url }) {
|
||||
const { jwt } = get(profile)
|
||||
|
||||
let page = Number(url.searchParams.get('page')) || 1
|
||||
|
||||
const res = await client({ func: fetch, auth: jwt }).listMedia({
|
||||
limit: 20,
|
||||
page: page,
|
||||
})
|
||||
|
||||
return { images: res.images }
|
||||
}
|
||||
Reference in new issue
Block a user