fix: 🐛

This commit is contained in:
codytseng
2025-01-14 11:55:43 +08:00
parent 35a22bd2ba
commit 6182fc914e
3 changed files with 32 additions and 32 deletions

View File

@@ -55,21 +55,15 @@ export function FeedProvider({ children }: { children: React.ReactNode }) {
}
if (feedType === 'following') {
if (!pubkey) return
return await switchFeed('following', { pubkey })
} else {
console.log('activeRelaySetId', activeRelaySetId)
await switchFeed('relays', { activeRelaySetId })
}
}
init()
}, [])
useEffect(() => {
if (pubkey && feedType === 'following') {
switchFeed('following', { pubkey })
}
}, [feedType, pubkey])
}, [pubkey])
const switchFeed = async (
feedType: TFeedType,