mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix loading replyCount
This commit is contained in:
@@ -534,12 +534,22 @@ const Thread = ({ setBodyStyle }) => {
|
|||||||
<a onClick={handleClickBottom} onMouseOver={(event) => event.target.style.cursor='pointer'} onTouchStart={handleClickBottom}>Bottom</a>
|
<a onClick={handleClickBottom} onMouseOver={(event) => event.target.style.cursor='pointer'} onTouchStart={handleClickBottom}>Bottom</a>
|
||||||
]
|
]
|
||||||
</span>
|
</span>
|
||||||
|
{/* "loading" indicator while replycount loads */}
|
||||||
{comment ? (
|
{comment ? (
|
||||||
comment.replyCount > 0 ? (
|
comment.replyCount !== undefined ? (
|
||||||
<span className="reply-stat">{comment.replyCount} replies</span>
|
comment.replyCount > 0 ? (
|
||||||
|
comment.replyCount === 1 ? (
|
||||||
|
<span className="reply-stat">{comment.replyCount} reply</span>
|
||||||
|
) : (
|
||||||
|
<span className="reply-stat">{comment.replyCount} replies</span>
|
||||||
|
)
|
||||||
|
) : (
|
||||||
|
<span className="reply-stat">No replies yet</span>
|
||||||
|
)
|
||||||
) : (
|
) : (
|
||||||
<span className="reply-stat">No replies yet</span>
|
<span className="reply-stat">Loading...</span>
|
||||||
)) : (
|
)
|
||||||
|
) : (
|
||||||
null
|
null
|
||||||
)}
|
)}
|
||||||
<hr />
|
<hr />
|
||||||
|
|||||||
Reference in New Issue
Block a user