fix(post): remove "user was banned for this post" because it's only visible to mods at the moment

This commit is contained in:
Tom (plebeius.eth)
2024-07-04 14:15:39 +02:00
parent 5b1d3ee8ed
commit 89e19adb5c
2 changed files with 11 additions and 7 deletions
+6 -4
View File
@@ -217,8 +217,9 @@ const PostMedia = ({ post }: PostProps) => {
};
const PostMessage = ({ post }: PostProps) => {
const { cid, content, commentAuthor, deleted, edit, original, parentCid, postCid, reason, removed, spoiler, state, subplebbitAddress } = post || {};
const banned = !!commentAuthor?.banExpiresAt;
const { cid, content, deleted, edit, original, parentCid, postCid, reason, removed, spoiler, state, subplebbitAddress } = post || {};
// TODO: commentAuthor is not available outside of editedComment, update when available
// const banned = !!post?.commentAuthor?.banExpiresAt;
const { t } = useTranslation();
const params = useParams();
const location = useLocation();
@@ -275,7 +276,8 @@ const PostMessage = ({ post }: PostProps) => {
)}
</>
)}
{banned && (
{/* TODO: commentAuthor is not available outside of editedComment, update when available */}
{/* {banned && (
<span className={styles.removedContent}>
<br />
<br />
@@ -288,7 +290,7 @@ const PostMessage = ({ post }: PostProps) => {
})}${reason ? `. ${_.capitalize(t('reason'))}: "${reason}"` : ''}`}
/>
</span>
)}
)} */}
{!isReply && content.length > 1000 && !isInPostView && (
<span className={styles.abbr}>
<br />
+5 -3
View File
@@ -153,7 +153,8 @@ const ReplyBacklinks = ({ post }: PostProps) => {
const PostMessageMobile = ({ post }: PostProps) => {
const { t } = useTranslation();
const { cid, commentAuthor, content, deleted, edit, original, parentCid, postCid, reason, removed, spoiler, state, subplebbitAddress } = post || {};
const banned = !!commentAuthor?.banExpiresAt;
// TODO: commentAuthor is not available outside of editedComment, update when available
// const banned = !!post?.commentAuthor?.banExpiresAt;
const [showOriginal, setShowOriginal] = useState(false);
const params = useParams();
@@ -211,7 +212,8 @@ const PostMessageMobile = ({ post }: PostProps) => {
)}
</>
)}
{banned && (
{/* TODO: commentAuthor is not available outside of editedComment, update when available */}
{/* {banned && (
<span className={styles.removedContent}>
<br />
<br />
@@ -224,7 +226,7 @@ const PostMessageMobile = ({ post }: PostProps) => {
})}${reason ? `. ${_.capitalize(t('reason'))}: "${reason}"` : ''}`}
/>
</span>
)}
)} */}
{!isReply && content.length > 1000 && !isInPostView && (
<span className={styles.abbr}>
<br />