enable reply link and post menu for description and rules posts

This commit is contained in:
Tom (plebeius.eth)
2024-08-30 22:48:17 +02:00
parent defd56f5f8
commit 2ccec85e56
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -190,7 +190,7 @@ const PostInfo = ({ openReplyModal, post, postReplyCount = 0, roles, isHidden }:
[
<Link
to={isInAllView && isDescription ? '/p/all/description' : `/p/${subplebbitAddress}/${isDescription ? 'description' : isRules ? 'rules' : `c/${postCid}`}`}
onClick={(e) => !cid && e.preventDefault()}
onClick={(e) => !cid && !isDescription && !isRules && e.preventDefault()}
>
{_.capitalize(t('reply'))}
</Link>
@@ -180,13 +180,13 @@ const PostMenuDesktop = ({ post }: { post: Comment }) => {
className={isInCatalogView ? styles.postMenuBtnCatalog : styles.postMenuBtn}
title='Post menu'
onClick={handleMenuClick}
style={{ transform: menuBtnRotated && cid ? 'rotate(90deg)' : 'rotate(0deg)' }}
style={{ transform: menuBtnRotated && (cid || isDescription || isRules) ? 'rotate(90deg)' : 'rotate(0deg)' }}
>
</span>
</span>
{menuBtnRotated &&
cid &&
(cid || isDescription || isRules) &&
createPortal(
<FloatingFocusManager context={context} modal={false}>
<div className={styles.postMenu} ref={refs.setFloating} style={floatingStyles} aria-labelledby={headingId} {...getFloatingProps()}>
@@ -164,7 +164,7 @@ const PostMenuMobile = ({ post }: { post: Comment }) => {
...
</span>
{isMenuOpen &&
cid &&
(cid || isDescription || isRules) &&
createPortal(
<FloatingFocusManager context={context} modal={false}>
<div className={styles.postMenu} ref={refs.setFloating} style={floatingStyles} aria-labelledby={headingId} {...getFloatingProps()}>