mirror of
https://github.com/lumina-rocks/lumina.git
synced 2026-06-05 10:11:16 +02:00
do not display a kind20 note if image does not start with "http" to prevent non-url errors
This commit is contained in:
@@ -27,7 +27,7 @@ const QuickViewKind20NoteCard: React.FC<QuickViewKind20NoteCardProps> = ({ pubke
|
||||
});
|
||||
const [imageError, setImageError] = useState(false);
|
||||
|
||||
if (!image || imageError) return null;
|
||||
if (!image || !image.startsWith("http") || imageError) return null;
|
||||
|
||||
text = text.replaceAll('\n', ' ');
|
||||
const encodedNoteId = nip19.noteEncode(event.id)
|
||||
|
||||
Reference in New Issue
Block a user