Skip to content

Commit

Permalink
fix(comment tools): don't show 'report' button if the user is the author
Browse files Browse the repository at this point in the history
  • Loading branch information
plebeius-eth committed Feb 25, 2024
1 parent 1a1be45 commit 96fd888
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions src/components/post/comment-tools/comment-tools.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,11 @@ const PostTools = ({ author, cid, hasLabel, index, isAuthor, isMod, subplebbitAd
{isMod ? (
<ModMenu cid={cid} />
) : (
<li className={`${styles.button} ${styles.reportButton}`}>
<span>{t('report')}</span>
</li>
!isAuthor && (
<li className={`${styles.button} ${styles.reportButton}`}>
<span>{t('report')}</span>
</li>
)
)}
</>
);
Expand All @@ -92,9 +94,11 @@ const ReplyTools = ({ author, cid, hasLabel, index, isAuthor, isMod, showReplyFo
{isMod ? (
<ModMenu cid={cid} />
) : (
<li className={`${styles.button} ${styles.reportButton}`}>
<span>{t('report')}</span>
</li>
!isAuthor && (
<li className={`${styles.button} ${styles.reportButton}`}>
<span>{t('report')}</span>
</li>
)
)}
</>
);
Expand Down Expand Up @@ -143,9 +147,11 @@ const SingleReplyTools = ({
{isMod ? (
<ModMenu cid={cid} />
) : (
<li className={`${styles.button} ${styles.reportButton}`}>
<span>{t('report')}</span>
</li>
!isAuthor && (
<li className={`${styles.button} ${styles.reportButton}`}>
<span>{t('report')}</span>
</li>
)
)}
</>
);
Expand Down

0 comments on commit 96fd888

Please sign in to comment.