mirror of
https://github.com/dergigi/boris.git
synced 2026-01-01 22:14:20 +01:00
fix: resolve undefined timeoutId variable in fetchBookmarks function
- Move timeoutId declaration outside try block to make it accessible in both try and catch blocks - Fixes ESLint no-undef error and TypeScript compilation error
This commit is contained in:
@@ -80,16 +80,16 @@ const Bookmarks: React.FC<BookmarksProps> = ({ relayPool, onLogout }) => {
|
||||
return
|
||||
}
|
||||
|
||||
// Set a timeout to ensure loading state gets reset
|
||||
const timeoutId = setTimeout(() => {
|
||||
console.log('⏰ Timeout reached, resetting loading state')
|
||||
setLoading(false)
|
||||
}, 15000) // 15 second timeout
|
||||
|
||||
try {
|
||||
setLoading(true)
|
||||
console.log('🚀 NEW VERSION: Fetching bookmark list for pubkey:', activeAccount.pubkey)
|
||||
|
||||
// Set a timeout to ensure loading state gets reset
|
||||
const timeoutId = setTimeout(() => {
|
||||
console.log('⏰ Timeout reached, resetting loading state')
|
||||
setLoading(false)
|
||||
}, 15000) // 15 second timeout
|
||||
|
||||
// Get relay URLs from the pool
|
||||
const relayUrls = Array.from(relayPool.relays.values()).map(relay => relay.url)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user