do not display a kind20 note if image does not start with "http" to prevent non-url errors

This commit is contained in:
mr0x50
2025-02-15 21:02:03 +01:00
parent a737463115
commit 2d923feda2
2 changed files with 3 additions and 3 deletions

View File

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