From 3aa6d6df98e2418a4b3904c804e858db037aa5d4 Mon Sep 17 00:00:00 2001 From: Vasyl Zhyliakov Date: Sun, 27 Oct 2024 16:37:47 +0300 Subject: [PATCH] Solution v 0.91 --- src/api/comments.ts | 12 ------------ src/components/NewCommentForm.tsx | 6 +++++- src/components/OneUser.tsx | 5 ++++- src/components/PostsList.tsx | 5 +---- src/components/UserSelector.tsx | 1 + 5 files changed, 11 insertions(+), 18 deletions(-) diff --git a/src/api/comments.ts b/src/api/comments.ts index 8d5b49463..d5e06897e 100644 --- a/src/api/comments.ts +++ b/src/api/comments.ts @@ -19,15 +19,3 @@ export const createComment = ({ }: Omit) => { return client.post('/comments', { postId, name, email, body }); }; - -// export interface Comment { -// id: number; -// postId: number; -// name: string; -// email: string; -// body: string; -// } - -// export const updateTodo = ({ id, title, completed }: Omit) => { -// return client.patch(`/todos/${id}`, { title, completed }); -// }; diff --git a/src/components/NewCommentForm.tsx b/src/components/NewCommentForm.tsx index 9ddb53f19..a2edea2c6 100644 --- a/src/components/NewCommentForm.tsx +++ b/src/components/NewCommentForm.tsx @@ -80,7 +80,11 @@ export const NewCommentForm: React.FC = ({ }; return ( -
+