From 2ebee13bf6e9ceb15ddcc77a14af16544582c5d2 Mon Sep 17 00:00:00 2001 From: plebbitor Date: Fri, 21 Apr 2023 17:13:13 +0200 Subject: [PATCH] fixed thread bottom bar --- src/components/styled/Thread.styled.jsx | 1 - src/components/views/Thread.jsx | 120 ++++++++++++------------ 2 files changed, 62 insertions(+), 59 deletions(-) diff --git a/src/components/styled/Thread.styled.jsx b/src/components/styled/Thread.styled.jsx index e69d84fe..22eb8e90 100644 --- a/src/components/styled/Thread.styled.jsx +++ b/src/components/styled/Thread.styled.jsx @@ -10,7 +10,6 @@ export const ReplyFormLink = styled.div` } @media (max-width: 480px) { - display: ${props => (props.showReplyFormLink ? 'block' : 'none')}; #post-form-link-desktop { display: none; diff --git a/src/components/views/Thread.jsx b/src/components/views/Thread.jsx index d47a1233..ccdea609 100644 --- a/src/components/views/Thread.jsx +++ b/src/components/views/Thread.jsx @@ -835,7 +835,7 @@ const Thread = () => { [ - {}} onClick={() => {}} onMouseOver={(event) => event.target.style.cursor='pointer'}>Post a Reply + {setIsReplyOpen(true); setSelectedParentCid(comment.cid); setSelectedShortCid(comment.shortCid);}} onMouseOver={(event) => event.target.style.cursor='pointer'}>Post a Reply ] {comment.replyCount > 0 ? ( @@ -846,67 +846,71 @@ const Thread = () => {
-
- -
- - Style: -   - - - {comment ? ( - comment.replyCount !== undefined ? ( - comment.replyCount > 0 ? ( - comment.replyCount === 1 ? ( - {comment.replyCount} reply + {comment.replyCount > 5 ? ( +
+ +
+ + Style: +   + + + {comment ? ( + comment.replyCount !== undefined ? ( + comment.replyCount > 0 ? ( + comment.replyCount === 1 ? ( + {comment.replyCount} reply + ) : ( + {comment.replyCount} replies + ) + ) : ( + No replies yet + ) ) : ( - {comment.replyCount} replies + Loading... ) ) : ( - No replies yet - ) - ) : ( - Loading... - ) - ) : ( - null - )} -
-
- -
- - event.target.style.cursor='pointer'}>Post a Reply - + null + )} +
+ + +
+ + {setIsReplyOpen(true); setSelectedParentCid(comment.cid); setSelectedShortCid(comment.shortCid);}} onMouseOver={(event) => event.target.style.cursor='pointer'}>Post a Reply + +
+ +
- -
-
+ ) : (null)} ) : (