+
+
+
+ {thread.author.displayName
+ ? thread.author.displayName.length > 15
+ ?
+
+ {thread.author.displayName.slice(0, 15) + " (...)"}
+
+
+ :
+ {thread.author.displayName}
+ :
Anonymous}
-
+
(u/
- {reply.author.address.length > 10 ?
-
- 15 ?
+
+
- {reply.author.address.slice(0, 10) + "..."}
+ {thread.author.address.slice(0, 15) + "..."}
- :
- {reply.author.address}
+ :
+ {thread.author.address}
}
)
-
+
+ {thread.title ? (
+ thread.title.length > 30 ?
+
+
+ {thread.title.slice(0, 30) + " (...)"}
+
+
+ :
+ {thread.title}
+ )
+ : null}
-
- {getDate(reply.timestamp)}
- c/
-
+
+ {getDate(thread.timestamp)}
+
+ c/
+
- {reply.content ? (
- reply.content.length > 1000 ?
-
-
-
- {`c/${reply.parentCid.slice(0, 8)}`}{
}
-
- {reply.content.slice(0, 1000)}
- (...)
-
- Comment too long.
- handleClickThread(thread.cid)} className="ttl-link">Click here
- to view.
-
-
- :
- handleQuoteClick(reply, event)}>
- {`c/${reply.parentCid.slice(0, 8)}`}{
}
-
- {reply.content}
-
)
- : null}
+ {commentMediaInfo?.url ? (
+ commentMediaInfo.type === "webpage" ? (
+
+
+
e.target.src = fallbackImgUrl} />
+ {commentMediaInfo.type}
+
+
+ ) : commentMediaInfo.type === "image" ? (
+
+
+
e.target.src = fallbackImgUrl} />
+ {commentMediaInfo.type}
+
+
+ ) : commentMediaInfo.type === "video" ? (
+
+
+ {
+ const img = document.querySelector(`img[key="img-${thread.cid}"]`);
+ if (img) {
+ img.src = thumbnail;
+ }
+ }}
+ />
+ {commentMediaInfo.type}
+
+
+ ) : commentMediaInfo.type === "audio" ? (
+
+
+
+
+ ) : null
+ ) : null}
+ {thread.content ? (
+ thread.content.length > 1500 ?
+
+
+ {thread.content.slice(0, 1500)}
+ (...)
+
+ Post too long.
+ handleClickThread(thread.cid)} className="ttl-link">Click here
+ to view.
+
+
+ :
+ {thread.content}
+
)
+ : null}
+