feat: improve the preview effect when note is not found

This commit is contained in:
codytseng
2025-03-08 00:06:31 +08:00
parent accf3319e7
commit 5e3cd04280
14 changed files with 28 additions and 18 deletions

View File

@@ -18,7 +18,7 @@ export default function ContentPreview({
}) {
const { t } = useTranslation()
const content = useMemo(() => {
if (!event) return t('Not found')
if (!event) return `[${t('Not found the note')}]`
const { contentWithoutEmbeddedNotes, embeddedNotes } = extractEmbeddedNotesFromContent(
event.content
)
@@ -35,7 +35,6 @@ export default function ContentPreview({
embeddedNostrNpubTextRenderer
])
}, [event])
if (!event) return null
return <div className={cn('pointer-events-none', className)}>{content}</div>
}