feat: show community in sidebar in a post

This commit is contained in:
Xyphyn committed 2023-10-12 15:41:42 -07:00
1 parent 010ae783cc
commit 05d26158f8
3 files changed
+12 -3

No files matched your search

@@ -1,5 +1,6 @@
import { env } from '$env/dynamic/public'
import { profile } from '$lib/auth.js'
import CommunityCard from '$lib/components/lemmy/community/CommunityCard.svelte'
import { getClient } from '$lib/lemmy.js'
import { SSR_ENABLED, userSettings } from '$lib/settings.js'
import { error } from '@sveltejs/kit'
@@ -47,5 +48,13 @@ export async function load({ params, url, fetch }) {
streamed: {
comments: getClient(params.instance, fetch).getComments(commentParams),
},
slots: {
sidebar: {
component: CommunityCard,
props: {
community_view: post.community_view,
},
},
},
}
}