feat(post): show loading state info

This commit is contained in:
Tom (plebeius.eth)
2024-07-22 12:29:32 +02:00
parent 6430607363
commit 7ff8af7fcd
3 changed files with 19 additions and 27 deletions
+9 -8
View File
@@ -348,7 +348,7 @@ const PostMobile = ({ openReplyModal, post, roles, showAllReplies, showReplies =
</div>
)}
</div>
{post?.replyCount === undefined && (
{post?.replyCount === undefined && !isInPendingPostView && (
<span className={styles.loadingString}>
<LoadingEllipsis string={t('loading_comments')} />
</span>
@@ -365,13 +365,14 @@ const PostMobile = ({ openReplyModal, post, roles, showAllReplies, showReplies =
</div>
))}
</div>
{stateString && stateString !== 'Failed' ? (
<div className={styles.stateString}>
<LoadingEllipsis string={stateString} />
</div>
) : (
state === 'failed' && <span className={styles.error}>{t('failed')}</span>
)}
{!isInPendingPostView &&
(stateString && stateString !== 'Failed' ? (
<div className={styles.stateString}>
<LoadingEllipsis string={stateString} />
</div>
) : (
state === 'failed' && <span className={styles.error}>{t('failed')}</span>
))}
</div>
)}
</>