From a927f3aa0070afd63f8540c231ed79252692c16b Mon Sep 17 00:00:00 2001 From: "Tom (plebeius.eth)" Date: Mon, 4 Nov 2024 18:52:15 +0100 Subject: [PATCH] fix(reply): hidden reply was too big and showed edit menu checkbox --- src/components/post-desktop/post-desktop.tsx | 6 +++--- src/views/post/post.module.css | 7 ++++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/components/post-desktop/post-desktop.tsx b/src/components/post-desktop/post-desktop.tsx index 40031fc6..26b601db 100644 --- a/src/components/post-desktop/post-desktop.tsx +++ b/src/components/post-desktop/post-desktop.tsx @@ -76,7 +76,7 @@ const PostInfo = ({ openReplyModal, post, postReplyCount = 0, roles, isHidden }: return (
- {!isHidden && } + {isHidden ? parentCid && : } {title && (title.length <= 75 ? ( @@ -403,7 +403,7 @@ const Reply = ({ openReplyModal, postReplyCount, reply, roles }: PostProps) => {
{'>>'}
- + {link && !hidden && !(deleted || removed) && isValidURL(link) && } {!hidden && (!(removed || deleted) || ((removed || deleted) && reason)) && }
@@ -413,7 +413,7 @@ const Reply = ({ openReplyModal, postReplyCount, reply, roles }: PostProps) => { const PostDesktop = ({ openReplyModal, post, roles, showAllReplies, showReplies = true }: PostProps) => { const { t } = useTranslation(); - const { author, cid, content, deleted, link, parentCid, pinned, postCid, removed, state, subplebbitAddress } = post || {}; + const { author, cid, content, deleted, link, pinned, postCid, removed, state, subplebbitAddress } = post || {}; const { isDescription, isRules } = post || {}; // custom properties, not from api const params = useParams(); const location = useLocation(); diff --git a/src/views/post/post.module.css b/src/views/post/post.module.css index 07a1f107..0f4d4a4b 100644 --- a/src/views/post/post.module.css +++ b/src/views/post/post.module.css @@ -581,4 +581,9 @@ .replyMobile { display: none; } -} \ No newline at end of file +} + +.hiddenReplyEditMenuSpacer { + width: 6px; + display: inline-block; +}