Error
; // else returnError
; } function Nostr() { const { nostrFeed, api } = useLocalState((s) => ({ nostrFeed: s.nostrFeed, api: s.api, })); const [isSyncing, setIsSyncing] = useState(false); const feed = eventsToFc(nostrFeed); console.log({ feed }); const refetch = () => feed; const handleResync = async () => { if (!api) return; setIsSyncing(true); try { await api.syncRelays(); toast.success("Nostr feed sync initiated"); } catch (error) { toast.error("Failed to sync Nostr feed"); console.error("Sync error:", error); } finally { setIsSyncing(false); } }; // Show empty state with resync option when no feed data if (!feed || !feed.feed || Object.keys(feed.feed).length === 0) { return (Your Nostr feed appears to be empty. Try syncing with your relays to fetch the latest posts.