feat: improve the preview effect when note is not found
This commit is contained in:
parent
accf3319e7
commit
5e3cd04280
14 changed files with 28 additions and 18 deletions
|
|
@ -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>
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ function EmbeddedNoteNotFound({ noteId, className }: { noteId: string; className
|
|||
}}
|
||||
variant="ghost"
|
||||
>
|
||||
{isCopied ? <Check /> : <Copy />} Copy note ID
|
||||
{isCopied ? <Check /> : <Copy />} {t('Copy event ID')}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue