mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
add value for comment.thumbnailUrl in embed
This commit is contained in:
@@ -489,7 +489,7 @@ const Board = () => {
|
||||
<span key={`fta-${index}`} className="file-thumb">
|
||||
{thread.thumbnailUrl ? (
|
||||
<img key={`fti-${index}`}
|
||||
src={thread.thumbnailUrl} alt={commentMediaInfo.type}
|
||||
src={commentMediaInfo.thumbnail} alt={commentMediaInfo.type}
|
||||
onClick={handleImageClick}
|
||||
style={{cursor: "pointer"}}
|
||||
onError={(e) => e.target.src = fallbackImgUrl} />
|
||||
@@ -725,7 +725,7 @@ const Board = () => {
|
||||
<span key={`fta-${index}`} className="file-thumb-reply">
|
||||
{reply.thumbnailUrl ? (
|
||||
<img key={`fti-${index}`}
|
||||
src={reply.thumbnailUrl} alt={replyMediaInfo.type}
|
||||
src={replyMediaInfo.thumbnail} alt={replyMediaInfo.type}
|
||||
onClick={handleImageClick}
|
||||
style={{cursor: "pointer"}}
|
||||
onError={(e) => e.target.src = fallbackImgUrl} />
|
||||
@@ -860,7 +860,7 @@ const Board = () => {
|
||||
<span key={`mob-ft${thread.cid}`} className="file-thumb-mobile">
|
||||
{thread.thumbnailUrl ? (
|
||||
<img key={`mob-img-${index}`}
|
||||
src={thread.thumbnailUrl} alt="thumbnail"
|
||||
src={commentMediaInfo.thumbnail} alt="thumbnail"
|
||||
onClick={handleImageClick}
|
||||
style={{cursor: "pointer"}}
|
||||
onError={(e) => e.target.src = fallbackImgUrl} />
|
||||
@@ -1002,7 +1002,7 @@ const Board = () => {
|
||||
<span key={`mob-ft${reply.cid}`} className="file-thumb-mobile">
|
||||
{reply.thumbnailUrl ? (
|
||||
<img key={`mob-img-${index}`}
|
||||
src={reply.thumbnailUrl} alt="thumbnail"
|
||||
src={replyMediaInfo.thumbnail} alt="thumbnail"
|
||||
onClick={handleImageClick}
|
||||
style={{cursor: "pointer"}}
|
||||
onError={(e) => e.target.src = fallbackImgUrl} />
|
||||
|
||||
@@ -469,7 +469,7 @@ const Thread = () => {
|
||||
<span key={`fta-${comment.cid}`} className="file-thumb">
|
||||
{comment.thumbnailUrl ? (
|
||||
<img key={`fti-${comment.cid}`}
|
||||
src={comment.thumbnailUrl} alt={commentMediaInfo.type}
|
||||
src={commentMediaInfo.thumbnail} alt={commentMediaInfo.type}
|
||||
onClick={handleImageClick}
|
||||
style={{cursor: "pointer"}}
|
||||
onError={(e) => e.target.src = fallbackImgUrl} />
|
||||
@@ -671,7 +671,7 @@ const Thread = () => {
|
||||
<span key={`fta-${index}`} className="file-thumb-reply">
|
||||
{reply.thumbnailUrl ? (
|
||||
<img key={`fti-${index}`}
|
||||
src={reply.thumbnailUrl} alt="thumbnail"
|
||||
src={replyMediaInfo.thumbnail} alt="thumbnail"
|
||||
onClick={handleImageClick}
|
||||
style={{cursor: "pointer"}}
|
||||
onError={(e) => e.target.src = fallbackImgUrl} />
|
||||
@@ -785,7 +785,7 @@ const Thread = () => {
|
||||
<span key={`mob-ft${comment.cid}`} className="file-thumb-mobile">
|
||||
{comment.thumbnailUrl ? (
|
||||
<img key={`mob-img-${comment.cid}`}
|
||||
src={comment.thumbnailUrl} alt={commentMediaInfo.type}
|
||||
src={commentMediaInfo.thumbnail} alt={commentMediaInfo.type}
|
||||
onClick={handleImageClick}
|
||||
style={{cursor: "pointer"}}
|
||||
onError={(e) => e.target.src = fallbackImgUrl} />
|
||||
@@ -905,7 +905,7 @@ const Thread = () => {
|
||||
<span key={`mob-ft${reply.cid}`} className="file-thumb-mobile">
|
||||
{reply.thumbnailUrl ? (
|
||||
<img key={`mob-img-${reply.cid}`}
|
||||
src={reply.thumbnailUrl} alt={replyMediaInfo.type}
|
||||
src={replyMediaInfo.thumbnail} alt={replyMediaInfo.type}
|
||||
onClick={handleImageClick}
|
||||
style={{cursor: "pointer"}}
|
||||
onError={(e) => e.target.src = fallbackImgUrl} />
|
||||
|
||||
@@ -39,8 +39,9 @@ const getCommentMediaInfo = (comment) => {
|
||||
|
||||
if (comment?.thumbnailUrl && comment?.thumbnailUrl !== comment?.link) {
|
||||
return {
|
||||
url: comment.thumbnailUrl,
|
||||
url: comment.link,
|
||||
type: 'webpage',
|
||||
thumbnail: comment.thumbnailUrl,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user