keep 'hide replies' button always

This commit is contained in:
Sean Yesmunt 2020-09-08 12:58:09 -04:00
parent acea7d75fb
commit 0bb129e7a6

View file

@ -100,11 +100,15 @@ function CommentsReplies(props: Props) {
onClick={handleCommentReply}
icon={ICONS.REPLY}
/>
{!isExpanded && Boolean(numberOfComments) && (
{Boolean(numberOfComments) && (
<Button
className="comment__action"
label={__('Show %number% Replies', { number: numberOfComments })}
onClick={() => setExpanded(true)}
label={
isExpanded
? __('Hide %number% Replies', { number: numberOfComments })
: __('Show %number% Replies', { number: numberOfComments })
}
onClick={() => setExpanded(!isExpanded)}
icon={ICONS.DOWN}
/>
)}