mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix(post): "c/" was clickable while post is pending
This commit is contained in:
@@ -153,25 +153,22 @@ const PostInfo = ({ openReplyModal, post, postReplyCount = 0, roles, isHidden }:
|
|||||||
<Link to={`/p/${subplebbitAddress}`}>p/{subplebbitAddress && Plebbit.getShortAddress(subplebbitAddress)}</Link>{' '}
|
<Link to={`/p/${subplebbitAddress}`}>p/{subplebbitAddress && Plebbit.getShortAddress(subplebbitAddress)}</Link>{' '}
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
{!(isDescription || isRules) && (
|
{!(isDescription || isRules) &&
|
||||||
<span className={styles.postNumLink}>
|
(cid ? (
|
||||||
{cid ? (
|
<span className={styles.postNumLink}>
|
||||||
<>
|
<Link to={`/p/${subplebbitAddress}/c/${cid}`} className={styles.linkToPost} title={t('link_to_post')} onClick={(e) => !cid && e.preventDefault()}>
|
||||||
<Link to={`/p/${subplebbitAddress}/c/${cid}`} className={styles.linkToPost} title={t('link_to_post')} onClick={(e) => !cid && e.preventDefault()}>
|
c/
|
||||||
c/
|
</Link>
|
||||||
</Link>
|
<span className={styles.replyToPost} title={t('reply_to_post')} onMouseDown={() => openReplyModal && openReplyModal(cid, postCid, subplebbitAddress)}>
|
||||||
<span className={styles.replyToPost} title={t('reply_to_post')} onMouseDown={() => openReplyModal && openReplyModal(cid, postCid, subplebbitAddress)}>
|
{shortCid}
|
||||||
{shortCid}
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</>
|
) : (
|
||||||
) : (
|
<>
|
||||||
<>
|
<span>c/</span>
|
||||||
<span style={{ cursor: 'pointer' }}>c/</span>
|
<span className={styles.pendingCid}>{state === 'failed' || stateString === 'Failed' ? 'Failed' : 'Pending'}</span>
|
||||||
<span className={styles.pendingCid}>{state === 'failed' || stateString === 'Failed' ? 'Failed' : 'Pending'}</span>
|
</>
|
||||||
</>
|
))}
|
||||||
)}
|
|
||||||
</span>
|
|
||||||
)}
|
|
||||||
{pinned && (
|
{pinned && (
|
||||||
<span className={`${styles.stickyIconWrapper} ${!locked && styles.addPaddingBeforeReply}`}>
|
<span className={`${styles.stickyIconWrapper} ${!locked && styles.addPaddingBeforeReply}`}>
|
||||||
<img src='assets/icons/sticky.gif' alt='' className={styles.stickyIcon} title={t('sticky')} />
|
<img src='assets/icons/sticky.gif' alt='' className={styles.stickyIcon} title={t('sticky')} />
|
||||||
|
|||||||
@@ -141,25 +141,22 @@ const PostInfoAndMedia = ({ openReplyModal, post, postReplyCount = 0, roles }: P
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<Tooltip children={<span>{getFormattedDate(timestamp)}</span>} content={getFormattedTimeAgo(timestamp)} />{' '}
|
<Tooltip children={<span>{getFormattedDate(timestamp)}</span>} content={getFormattedTimeAgo(timestamp)} />{' '}
|
||||||
{!(isDescription || isRules) && (
|
{!(isDescription || isRules) &&
|
||||||
<span className={styles.postNumLink}>
|
(cid ? (
|
||||||
{cid ? (
|
<span className={styles.postNumLink}>
|
||||||
<>
|
<Link to={`/p/${subplebbitAddress}/c/${cid}`} className={styles.linkToPost} title={t('link_to_post')} onClick={(e) => !cid && e.preventDefault()}>
|
||||||
<Link to={`/p/${subplebbitAddress}/c/${cid}`} className={styles.linkToPost} title={t('link_to_post')} onClick={(e) => !cid && e.preventDefault()}>
|
c/
|
||||||
c/
|
</Link>
|
||||||
</Link>
|
<span className={styles.replyToPost} title={t('reply_to_post')} onMouseDown={() => openReplyModal && openReplyModal(cid, postCid, subplebbitAddress)}>
|
||||||
<span className={styles.replyToPost} title={t('reply_to_post')} onMouseDown={() => openReplyModal && openReplyModal(cid, postCid, subplebbitAddress)}>
|
{shortCid.slice(0, -4)}
|
||||||
{shortCid.slice(0, -4)}
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</>
|
) : (
|
||||||
) : (
|
<>
|
||||||
<>
|
<span>c/</span>
|
||||||
<span style={{ cursor: 'pointer' }}>c/</span>
|
<span className={styles.pendingCid}>{state === 'failed' || stateString === 'Failed' ? 'Failed' : 'Pending'}</span>
|
||||||
<span className={styles.pendingCid}>{state === 'failed' || stateString === 'Failed' ? 'Failed' : 'Pending'}</span>
|
</>
|
||||||
</>
|
))}
|
||||||
)}
|
|
||||||
</span>
|
|
||||||
)}
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
{(hasThumbnail || link) && !(deleted || removed) && (
|
{(hasThumbnail || link) && !(deleted || removed) && (
|
||||||
|
|||||||
Reference in New Issue
Block a user