feat: Add instance changing
This commit is contained in:
1 parent
f201123291
commit
3159583654
17 files changed
+142
-35
No files matched your search
@@ -1,5 +0,0 @@
|
||||
import { lemmy } from '$lib/lemmy.js';
|
||||
|
||||
export function load({ params }) {
|
||||
return lemmy.getCommunity({ name: params.name })
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import { getClient } from '$lib/lemmy.js'
|
||||
|
||||
export function load({ params }) {
|
||||
return getClient().getCommunity({ name: params.name })
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import { lemmy } from '$lib/lemmy.js'
|
||||
import { getClient } from '$lib/lemmy.js'
|
||||
import type { ListingType, SortType } from 'lemmy-js-client'
|
||||
|
||||
export function load(req: any) {
|
||||
@@ -7,7 +7,7 @@ export function load(req: any) {
|
||||
const sort: SortType =
|
||||
(req.url.searchParams.get('sort') as SortType) || 'Active'
|
||||
|
||||
return lemmy.getPosts({
|
||||
return getClient(req.cookies.get('instance_url')).getPosts({
|
||||
limit: 40,
|
||||
community_name: req.params.name,
|
||||
page: page,
|
||||
|
||||
Reference in new issue
Block a user