Skip to content

Commit

Permalink
Refactored comments components and show replies on button click
Browse files Browse the repository at this point in the history
  • Loading branch information
akasunil committed Nov 28, 2024
1 parent a48a414 commit ccf3d25
Show file tree
Hide file tree
Showing 3 changed files with 246 additions and 224 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ function CommentForm( { onSubmit, onCancel, thread, submitButtonText } ) {
__next40pxDefaultSize
accessibleWhenDisabled
variant="primary"
onClick={ () => onSubmit( inputComment ) }
onClick={ () => {
onSubmit( inputComment );
setInputComment( '' );
} }
disabled={
0 === sanitizeCommentString( inputComment ).length
}
Expand Down
Loading

0 comments on commit ccf3d25

Please sign in to comment.