Link:
{
replyMediaInfo?.url.length > 30 ?
replyMediaInfo?.url.slice(0, 30) + "(...)" :
replyMediaInfo?.url
- } ({replyMediaInfo?.type})
- {replyMediaInfo?.type === "video" || replyMediaInfo?.type === "iframe" ? (
- isReplyThumbnailClicked[index] ? (
-
- -[
- {handleThumbnailClick(index, 'reply')}}>Close
- ]
- )
- : null)
- : null}
+ } {replyMediaInfo?.type === "iframe" ? null : `(${replyMediaInfo?.type})`}
+ { ((isReplyThumbnailClicked[index] && (replyMediaInfo.type === 'iframe' || replyMediaInfo.type === 'video')) || (replyMediaInfo.type === 'iframe' && !replyMediaInfo.thumbnail)) && (
+
+ [
+ {handleThumbnailClick(index, 'reply')}}>
+ {isReplyThumbnailClicked[index] ? 'Close' : 'Embed'}
+
+ ]
+
+ )}
- {replyMediaInfo?.type === "webpage" ? (
-
+ {replyMediaInfo?.type === 'iframe' && (
+
+
+ {isReplyThumbnailClicked[index] && replyMediaInfo.url ? (
+
+ ) : replyMediaInfo.thumbnail ? (
+
{handleThumbnailClick(index, 'reply')}}
+ style={{cursor: "pointer"}}
+ onError={(e) => e.target.src = fallbackImgUrl} />
+ ) : null}
+
+
+ )}
+ {replyMediaInfo?.type === "webpage" && (
+
{reply.thumbnailUrl ? (
-
{handleImageClick(e); handleThumbnailClick(index, 'reply')}}
style={{cursor: "pointer"}}
@@ -1454,51 +1471,50 @@ const All = () => {
) : null}
- ) : null}
- {replyMediaInfo?.type === "image" ? (
-
+ )}
+ {replyMediaInfo?.type === "image" && (
+
-
{handleImageClick(e); handleThumbnailClick(index, 'reply')}}
style={{cursor: "pointer"}}
onError={(e) => e.target.src = fallbackImgUrl} />
- ) : null}
- {replyMediaInfo?.type === "video" ? (
-
-
- {isReplyThumbnailClicked[index] ? (
-
-
- ) : null}
- {replyMediaInfo?.type === "audio" ? (
-
-
+ )}
+ {replyMediaInfo?.type === "audio" && (
+
+
- ) : null}
+ )}
) : null}
{reply.content ? (
@@ -1819,108 +1835,102 @@ const All = () => {