feat: Add post uploading
This commit is contained in:
1 parent
5f674d4691
commit
1842139af9
31 files changed
+560
-225
No files matched your search
@@ -1,5 +1,6 @@
|
||||
import { getClient } from '$lib/lemmy.js'
|
||||
import { authData, getClient } from '$lib/lemmy.js'
|
||||
import type { ListingType } from 'lemmy-js-client'
|
||||
import { get } from 'svelte/store'
|
||||
|
||||
export function load({ url }) {
|
||||
const type = url.searchParams.get('listingType') as ListingType
|
||||
@@ -10,17 +11,19 @@ export function load({ url }) {
|
||||
return getClient().search({
|
||||
limit: 40,
|
||||
page: page,
|
||||
sort: 'Active',
|
||||
sort: 'TopAll',
|
||||
type_: 'Communities',
|
||||
listing_type: type,
|
||||
q: query,
|
||||
auth: get(authData)?.token,
|
||||
})
|
||||
} else {
|
||||
return getClient().listCommunities({
|
||||
limit: 40,
|
||||
page: page,
|
||||
sort: 'Active',
|
||||
sort: 'TopAll',
|
||||
type_: type,
|
||||
auth: get(authData)?.token,
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user