diff --git a/src/components/views/Thread.jsx b/src/components/views/Thread.jsx index 743d2beb..5476acf9 100644 --- a/src/components/views/Thread.jsx +++ b/src/components/views/Thread.jsx @@ -444,6 +444,9 @@ const Thread = () => { {comment !== undefined ? ( + comment.state === "fetching-ipfs" ? ( + + ) : ( <>
@@ -555,9 +558,7 @@ const Thread = () => {
- {comment.state === "fetching-ipns" ? - (null) : - (comment.replyCount === undefined ? () : (null))} + {comment.state === "fetching-ipns" ? : null} {sortedReplies.map((reply, index) => { const replyMediaInfo = getCommentMediaInfo(reply); const fallbackImgUrl = "/assets/filedeleted-res.gif"; @@ -946,10 +947,22 @@ const Thread = () => { {setIsReplyOpen(true); setSelectedParentCid(comment.cid); setSelectedShortCid(comment.shortCid);}} onMouseOver={(event) => event.target.style.cursor='pointer'}>Post a Reply ] - {comment.replyCount > 0 ? ( - {comment.replyCount} replies + {comment ? ( + comment.replyCount !== undefined ? ( + comment.replyCount > 0 ? ( + comment.replyCount === 1 ? ( + {comment.replyCount} reply + ) : ( + {comment.replyCount} replies + ) + ) : ( + No replies yet + ) + ) : ( + {formatState(comment.state)} + ) ) : ( - No replies yet + {formatState(comment.state)} )}
@@ -1020,9 +1033,7 @@ const Thread = () => { ) : (null)} - ) : ( - - )} + )) : null}