feat: 💨

This commit is contained in:
codytseng 2025-11-01 17:12:13 +08:00
parent 38bc425d50
commit 934c56a20d
2 changed files with 6 additions and 20 deletions

View file

@ -47,10 +47,13 @@ export function FeedProvider({ children }: { children: React.ReactNode }) {
const storedFeedInfo = storage.getFeedInfo(pubkey)
if (storedFeedInfo) {
feedInfo = storedFeedInfo
} else {
feedInfo = { feedType: 'following' }
}
}
if (!feedInfo) {
setIsReady(true)
return
}
@ -71,12 +74,6 @@ export function FeedProvider({ children }: { children: React.ReactNode }) {
init()
}, [pubkey, isInitialized])
useEffect(() => {
if (pubkey && !feedInfo) {
switchFeed('following', { pubkey })
}
}, [pubkey, feedInfo])
const switchFeed = async (
feedType: TFeedType | null,
options: {