diff --git a/src/routes/communities/+page.svelte b/src/routes/communities/+page.svelte
index 1960bbae..05f688fb 100644
--- a/src/routes/communities/+page.svelte
+++ b/src/routes/communities/+page.svelte
@@ -9,7 +9,7 @@
PencilSquare,
UserGroup,
} from 'svelte-hero-icons'
- import CommunityLink from '$lib/components/CommunityLink.svelte'
+ import CommunityLink from '$lib/components/community/CommunityLink.svelte'
import Link from '$lib/components/Link.svelte'
import { Color } from '$lib/ui/colors.js'
diff --git a/src/routes/communities/+page.server.ts b/src/routes/communities/+page.ts
similarity index 75%
rename from src/routes/communities/+page.server.ts
rename to src/routes/communities/+page.ts
index 961e3fc7..dc1e064e 100644
--- a/src/routes/communities/+page.server.ts
+++ b/src/routes/communities/+page.ts
@@ -1,13 +1,13 @@
import { getClient } from '$lib/lemmy.js'
import type { ListingType } from 'lemmy-js-client'
-export function load({ url, cookies }) {
+export function load({ url }) {
const type = url.searchParams.get('listingType') as ListingType
const page = Number(url.searchParams.get('page')) || 1
const query = url.searchParams.get('q')
if (query) {
- return getClient(cookies.get('instance_url')).search({
+ return getClient().search({
limit: 40,
page: page,
sort: 'Active',
@@ -16,7 +16,7 @@ export function load({ url, cookies }) {
q: query,
})
} else {
- return getClient(cookies.get('instance_url')).listCommunities({
+ return getClient().listCommunities({
limit: 40,
page: page,
sort: 'Active',
diff --git a/src/routes/post/[id]/+page.svelte b/src/routes/post/[id]/+page.svelte
index 95330edf..a7759def 100644
--- a/src/routes/post/[id]/+page.svelte
+++ b/src/routes/post/[id]/+page.svelte
@@ -9,7 +9,7 @@
import type { CommentNodeI } from './comments.js'
import Comments from './Comments.svelte'
import SvelteMarkdown from 'svelte-markdown'
- import CommunityLink from '$lib/components/CommunityLink.svelte'
+ import CommunityLink from '$lib/components/community/CommunityLink.svelte'
import { isImage } from '$lib/ui/image.js'
export let data: { post: GetPostResponse; comments: GetCommentsResponse }
@@ -88,8 +88,8 @@
{data.post.post_view.post.name}
-
-
+
+ {postData.creator.name}
{post.name}
@@ -112,7 +112,7 @@
{#if post.body}
diff --git a/src/routes/post/[id]/+page.server.ts b/src/routes/post/[id]/+page.ts
similarity index 57%
rename from src/routes/post/[id]/+page.server.ts
rename to src/routes/post/[id]/+page.ts
index 538ef982..fc7e5905 100644
--- a/src/routes/post/[id]/+page.server.ts
+++ b/src/routes/post/[id]/+page.ts
@@ -1,11 +1,11 @@
import { getClient } from '$lib/lemmy.js'
-export async function load({ params, cookies }) {
+export async function load({ params }) {
return {
- post: await getClient(cookies.get('instance_url')).getPost({
+ post: await getClient().getPost({
id: Number(params.id),
}),
- comments: await getClient(cookies.get('instance_url')).getComments({
+ comments: await getClient().getComments({
post_id: Number(params.id),
type_: 'All',
limit: 250,
diff --git a/src/routes/post/[id]/Comments.svelte b/src/routes/post/[id]/Comments.svelte
index 75c8d72c..6552e4cc 100644
--- a/src/routes/post/[id]/Comments.svelte
+++ b/src/routes/post/[id]/Comments.svelte
@@ -11,7 +11,7 @@
{#each nodes.slice(0, maxComments) as node}
diff --git a/src/routes/post/[id]/Post.svelte b/src/routes/post/[id]/Post.svelte
index 5cfea521..e560c89a 100644
--- a/src/routes/post/[id]/Post.svelte
+++ b/src/routes/post/[id]/Post.svelte
@@ -17,7 +17,7 @@
} from 'svelte-hero-icons'
import type { CommentNodeI } from './comments.js'
import RelativeDate from '$lib/components/RelativeDate.svelte'
- import CommunityLink from '$lib/components/CommunityLink.svelte'
+ import CommunityLink from '$lib/components/community/CommunityLink.svelte'
import { isImage } from '$lib/ui/image.js'
let postRes: PostView
@@ -29,8 +29,9 @@
rounded-md flex flex-col overflow-hidden max-w-xl w-full"
>
-
-
+
+
+
{postRes.creator.name}
diff --git a/svelte.config.js b/svelte.config.js
index 1cf26a00..a3e6e3ef 100644
--- a/svelte.config.js
+++ b/svelte.config.js
@@ -11,7 +11,7 @@ const config = {
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
// If your environment is not supported or you settled on a specific environment, switch out the adapter.
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
- adapter: adapter()
+ adapter: adapter(),
}
};