Skip to content

Commit

Permalink
Refactor PostItems
Browse files Browse the repository at this point in the history
  • Loading branch information
syavaYki committed Sep 27, 2024
1 parent bfcc001 commit 353ef6a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/NewCommentForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export const NewCommentForm: React.FC<Props> = ({
};

const handleClear = () => {
setBody('');
setErrorName(false);
setErrorEmail(false);
setErrorBody(false);
Expand Down
3 changes: 3 additions & 0 deletions src/components/PostDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ export const PostDetails: React.FC<Props> = ({ post }) => {

useEffect(() => {
setCommenting(false);
}, [post]);

useEffect(() => {
if (post) {
setLoading(true);
commentClient
Expand Down

0 comments on commit 353ef6a

Please sign in to comment.