Skip to content

Commit

Permalink
fix bugs with coments space
Browse files Browse the repository at this point in the history
  • Loading branch information
manch0ffline committed Oct 6, 2024
1 parent 9021f2b commit 765099b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/NewCommentForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export const NewCommentForm: React.FC<Props> = ({
setComentError('Enter some text');
}

if (nameValue && emailValue && comentValue && post) {
if (nameValue.trim() && emailValue.trim() && comentValue.trim() && post) {
addComent(post.id, nameValue, emailValue, comentValue);
setComentValue('');
}
Expand Down

0 comments on commit 765099b

Please sign in to comment.