From 2ab71978a7329fd0d58e0ce028332cd25b65c931 Mon Sep 17 00:00:00 2001 From: "Tom (plebeius.eth)" Date: Thu, 1 Aug 2024 14:40:07 +0200 Subject: [PATCH] fix(post): 'comment too long' link was broken for description and rules --- src/components/post-desktop/post-desktop.tsx | 7 ++++++- src/components/post-mobile/post-mobile.tsx | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/components/post-desktop/post-desktop.tsx b/src/components/post-desktop/post-desktop.tsx index b76d0adc..6c9b6493 100644 --- a/src/components/post-desktop/post-desktop.tsx +++ b/src/components/post-desktop/post-desktop.tsx @@ -240,6 +240,7 @@ const PostMedia = ({ post }: PostProps) => { const PostMessage = ({ post }: PostProps) => { const { cid, content, deleted, edit, original, parentCid, postCid, reason, removed, state, subplebbitAddress } = post || {}; + const { isDescription, isRules } = post || {}; // custom properties, not from api // TODO: commentAuthor is not available outside of editedComment, update when available // const banned = !!post?.commentAuthor?.banExpiresAt; const { t } = useTranslation(); @@ -320,7 +321,11 @@ const PostMessage = ({ post }: PostProps) => { {!isReply && content.length > 1000 && !isInPostView && (
- }} /> + }} + />
)} {!cid && state === 'pending' && stateString !== 'Failed' && ( diff --git a/src/components/post-mobile/post-mobile.tsx b/src/components/post-mobile/post-mobile.tsx index 3a6dc329..01e9c3af 100644 --- a/src/components/post-mobile/post-mobile.tsx +++ b/src/components/post-mobile/post-mobile.tsx @@ -164,6 +164,7 @@ const ReplyBacklinks = ({ post }: PostProps) => { const PostMessageMobile = ({ post }: PostProps) => { const { t } = useTranslation(); const { cid, content, deleted, edit, original, parentCid, postCid, reason, removed, state, subplebbitAddress } = post || {}; + const { isDescription, isRules } = post || {}; // custom properties, not from api // TODO: commentAuthor is not available outside of editedComment, update when available // const banned = !!post?.commentAuthor?.banExpiresAt; const [showOriginal, setShowOriginal] = useState(false); @@ -244,7 +245,11 @@ const PostMessageMobile = ({ post }: PostProps) => { {!isReply && content.length > 1000 && !isInPostView && (
- }} /> + }} + />
)} {!cid && state === 'pending' && stateString !== 'Failed' && (