fix: feed inconsistency between profiles

This commit is contained in:
James Xylight committed 2025-09-12 14:50:06 -07:00
1 parent abe54ad113
commit 46e40abeee
2 files changed
+10 -2

No files matched your search

+8
View File
@@ -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()
})
})
+2 -2
View File
@@ -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,
},
},
},