display state strings from backend, but with user friendly wording

This commit is contained in:
Tom (plebeius.eth)
2025-02-20 13:29:24 +01:00
parent 7172be4960
commit 684ca25a65
42 changed files with 139 additions and 85 deletions
+3 -1
View File
@@ -374,7 +374,7 @@ const PostMobile = ({ openReplyModal, post, roles, showAllReplies, showReplies =
const isInPostPageView = isPostPageView(location.pathname, params);
const { hidden, unhide } = useHide({ cid });
const stateString = useStateString(post);
const stateString = useStateString(post) || t('loading_post');
const subplebbit = useSubplebbit({ subplebbitAddress });
const showRules = isDescription && subplebbit?.rules && subplebbit?.rules.length > 0;
@@ -448,6 +448,8 @@ const PostMobile = ({ openReplyModal, post, roles, showAllReplies, showReplies =
)}
</div>
{!isInPendingPostView &&
!isDescription &&
!isRules &&
(stateString && stateString !== 'Failed' && state !== 'succeeded' ? (
<div className={styles.stateString}>
<LoadingEllipsis string={stateString} />