mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
display state strings from backend, but with user friendly wording
This commit is contained in:
@@ -447,7 +447,7 @@ const PostDesktop = ({ openReplyModal, post, roles, showAllReplies, showReplies
|
||||
const linksCount = pinned ? totalLinksCount : totalLinksCount - visiblelinksCount;
|
||||
const { showOmittedReplies, setShowOmittedReplies } = useShowOmittedReplies();
|
||||
|
||||
const stateString = useStateString(post);
|
||||
const stateString = useStateString(post) || t('loading_board');
|
||||
|
||||
const subplebbit = useSubplebbit({ subplebbitAddress });
|
||||
|
||||
@@ -522,6 +522,8 @@ const PostDesktop = ({ openReplyModal, post, roles, showAllReplies, showReplies
|
||||
)}
|
||||
</div>
|
||||
{!isInPendingPostView &&
|
||||
!isDescription &&
|
||||
!isRules &&
|
||||
(stateString && stateString !== 'Failed' && state !== 'succeeded' ? (
|
||||
<div className={styles.stateString}>
|
||||
<br />
|
||||
|
||||
@@ -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} />
|
||||
|
||||
Reference in New Issue
Block a user