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 { browser } from '$app/environment'
|
||||||
|
import { profile } from '$lib/auth.svelte'
|
||||||
import type {
|
import type {
|
||||||
CommentView,
|
CommentView,
|
||||||
CommunityView,
|
CommunityView,
|
||||||
@@ -109,3 +110,10 @@ export function feed<Type extends keyof FeedTypes>(
|
|||||||
|
|
||||||
return feedData
|
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: {
|
sidebar: {
|
||||||
component: CommunityCard,
|
component: CommunityCard,
|
||||||
props: {
|
props: {
|
||||||
community_view: feedData.community.community_view,
|
community_view: feedData?.community?.community_view,
|
||||||
moderators: feedData.community.moderators,
|
moderators: feedData?.community?.moderators,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in new issue
Block a user