chore: remove console.log debug output

This commit is contained in:
Gigi
2025-11-02 23:11:40 +01:00
parent f417ed8210
commit ea3c130cc3
6 changed files with 5 additions and 123 deletions

View File

@@ -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) {

View File

@@ -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