Update Thread.jsx

This commit is contained in:
Tom
2023-04-27 18:06:16 +02:00
parent b5c4ef1fe4
commit fca0030df6
+4
View File
@@ -650,10 +650,12 @@ const Thread = () => {
</div> </div>
{replyMediaInfo?.type === "webpage" ? ( {replyMediaInfo?.type === "webpage" ? (
<span key={`fta-${index}`} className="file-thumb-reply"> <span key={`fta-${index}`} className="file-thumb-reply">
{reply.thumbnailUrl ? (
<img key={`fti-${index}`} <img key={`fti-${index}`}
src={reply.thumbnailUrl} src={reply.thumbnailUrl}
alt="thumbnail" alt="thumbnail"
onError={(e) => e.target.src = fallbackImgUrl} /> onError={(e) => e.target.src = fallbackImgUrl} />
) : null}
</span> </span>
) : null} ) : null}
{replyMediaInfo?.type === "image" ? ( {replyMediaInfo?.type === "image" ? (
@@ -758,7 +760,9 @@ const Thread = () => {
commentMediaInfo.type === "webpage" ? ( commentMediaInfo.type === "webpage" ? (
<div key={`mob-f-${comment.cid}`} className="file-mobile"> <div key={`mob-f-${comment.cid}`} className="file-mobile">
<span key={`mob-ft${comment.cid}`} className="file-thumb-mobile"> <span key={`mob-ft${comment.cid}`} className="file-thumb-mobile">
{comment.thumbnailUrl ? (
<img key={`mob-img-${comment.cid}`} src={comment.thumbnailUrl} alt="thumbnail" onError={(e) => e.target.src = fallbackImgUrl} /> <img key={`mob-img-${comment.cid}`} src={comment.thumbnailUrl} alt="thumbnail" onError={(e) => e.target.src = fallbackImgUrl} />
) : null}
<div key={`mob-fi-${comment.cid}`} className="file-info-mobile">{commentMediaInfo.type}</div> <div key={`mob-fi-${comment.cid}`} className="file-info-mobile">{commentMediaInfo.type}</div>
</span> </span>
</div> </div>