fix: feed inconsistency between profiles
This commit is contained in:
2 files changed
+10
-2
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import { browser } from '$app/environment'
|
||||
import { profile } from '$lib/auth.svelte'
|
||||
import type {
|
||||
CommentView,
|
||||
CommunityView,
|
||||
@@ -109,3 +110,10 @@ export function feed<Type extends keyof FeedTypes>(
|
||||
|
||||
return feedData
|
||||
}
|
||||
|
||||
// feed hooks
|
||||
$effect.root(() => {
|
||||
$effect(() => {
|
||||
if (profile.meta.profile) feeds.clear()
|
||||
})
|
||||
})
|
||||
@@ -38,8 +38,8 @@ export async function load({ params, fetch, url, route }) {
|
||||
sidebar: {
|
||||
component: CommunityCard,
|
||||
props: {
|
||||
community_view: feedData.community.community_view,
|
||||
moderators: feedData.community.moderators,
|
||||
community_view: feedData?.community?.community_view,
|
||||
moderators: feedData?.community?.moderators,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user