mirror of
https://github.com/dergigi/boris.git
synced 2026-02-23 16:04:29 +01:00
chore: remove console.log debug output
This commit is contained in:
@@ -46,24 +46,16 @@ const NostrMentionLink: React.FC<NostrMentionLinkProps> = ({
|
||||
// Check cache
|
||||
const cached = loadCachedProfiles([pubkey])
|
||||
if (cached.has(pubkey)) {
|
||||
console.log(`[profile-loading-debug][nostr-mention-link] ${nostrUri.slice(0, 30)}... in cache`)
|
||||
return true
|
||||
}
|
||||
// Check eventStore
|
||||
const eventStoreProfile = eventStore?.getEvent(pubkey + ':0')
|
||||
const inStore = !!eventStoreProfile
|
||||
if (inStore) {
|
||||
console.log(`[profile-loading-debug][nostr-mention-link] ${nostrUri.slice(0, 30)}... in eventStore`)
|
||||
}
|
||||
return inStore
|
||||
}, [pubkey, eventStore, nostrUri])
|
||||
return !!eventStoreProfile
|
||||
}, [pubkey, eventStore])
|
||||
|
||||
// Show loading if profile doesn't exist and not in cache/store (for npub/nprofile)
|
||||
const isLoading = !profile && pubkey && !isInCacheOrStore &&
|
||||
decoded && (decoded.type === 'npub' || decoded.type === 'nprofile')
|
||||
if (isLoading) {
|
||||
console.log(`[profile-loading-debug][nostr-mention-link] ${nostrUri.slice(0, 30)}... isLoading=true (profile=${!!profile}, pubkey=${!!pubkey}, inCacheOrStore=${isInCacheOrStore})`)
|
||||
}
|
||||
|
||||
// If decoding failed, show shortened identifier
|
||||
if (!decoded) {
|
||||
|
||||
@@ -31,23 +31,15 @@ const ResolvedMention: React.FC<ResolvedMentionProps> = ({ encoded }) => {
|
||||
// Check cache
|
||||
const cached = loadCachedProfiles([pubkey])
|
||||
if (cached.has(pubkey)) {
|
||||
console.log(`[profile-loading-debug][resolved-mention] ${encoded?.slice(0, 16)}... in cache`)
|
||||
return true
|
||||
}
|
||||
// Check eventStore
|
||||
const eventStoreProfile = eventStore?.getEvent(pubkey + ':0')
|
||||
const inStore = !!eventStoreProfile
|
||||
if (inStore) {
|
||||
console.log(`[profile-loading-debug][resolved-mention] ${encoded?.slice(0, 16)}... in eventStore`)
|
||||
}
|
||||
return inStore
|
||||
}, [pubkey, eventStore, encoded])
|
||||
return !!eventStoreProfile
|
||||
}, [pubkey, eventStore])
|
||||
|
||||
// Show loading if profile doesn't exist and not in cache/store
|
||||
const isLoading = !profile && pubkey && !isInCacheOrStore
|
||||
if (isLoading && encoded) {
|
||||
console.log(`[profile-loading-debug][resolved-mention] ${encoded.slice(0, 16)}... isLoading=true (profile=${!!profile}, pubkey=${!!pubkey}, inCacheOrStore=${isInCacheOrStore})`)
|
||||
}
|
||||
|
||||
const display = pubkey ? getProfileDisplayName(profile, pubkey) : encoded
|
||||
const npub = pubkey ? npubEncode(pubkey) : undefined
|
||||
|
||||
Reference in New Issue
Block a user