feat: 💨
This commit is contained in:
parent
38bc425d50
commit
934c56a20d
2 changed files with 6 additions and 20 deletions
|
|
@ -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: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue