mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix(mod queue): preserve moderated queue history
This commit is contained in:
@@ -567,6 +567,7 @@ const PostMobile = ({
|
||||
isPublishing,
|
||||
onApprove,
|
||||
onReject,
|
||||
onRemoveFromModQueue,
|
||||
}: PostProps) => {
|
||||
const { t } = useTranslation();
|
||||
const resolvedPost = withResolvedCommentCommunityAddress(post);
|
||||
@@ -583,6 +584,11 @@ const PostMobile = ({
|
||||
const modQueueThreadRoute = getModQueueCommentRoute(boardPath, resolvedPost?.cid);
|
||||
const modQueueThreadRouteState = getQueuedCommentRouteState(resolvedPost);
|
||||
const modQueueErrorMessage = formatErrorForDisplay(modQueueError);
|
||||
const modQueueRemoveButton = onRemoveFromModQueue ? (
|
||||
<button className={`button ${styles.rejectButton}`} onClick={onRemoveFromModQueue} disabled={isPublishing}>
|
||||
{t('remove')}
|
||||
</button>
|
||||
) : null;
|
||||
const linksCount = useCountLinksInReplies(resolvedPost);
|
||||
const hasReplyPaginationOverride = !!replyPaginationOverride;
|
||||
const shouldFetchReplies = showReplies && !isModQueue && !hasReplyPaginationOverride;
|
||||
@@ -850,9 +856,15 @@ const PostMobile = ({
|
||||
{isModQueue ? (
|
||||
<div className={styles.modQueueActions}>
|
||||
{modQueueStatus === 'approved' ? (
|
||||
<span className={styles.modQueueStatusApproved}>{t('approved')}</span>
|
||||
<>
|
||||
<span className={styles.modQueueStatusApproved}>{t('approved')}</span>
|
||||
{modQueueRemoveButton}
|
||||
</>
|
||||
) : modQueueStatus === 'rejected' ? (
|
||||
<span className={styles.modQueueStatusRejected}>{t('rejected')}</span>
|
||||
<>
|
||||
<span className={styles.modQueueStatusRejected}>{t('rejected')}</span>
|
||||
{modQueueRemoveButton}
|
||||
</>
|
||||
) : modQueueStatus === 'failed' ? (
|
||||
<span className={styles.modQueueStatusRejected} title={modQueueErrorMessage}>
|
||||
{t('failed')}
|
||||
|
||||
Reference in New Issue
Block a user