Archived
frontend: Ajouter/Retirer une fonction des favoris
This commit is contained in:
1 parent
0ac2fbf3ab
commit
02058fc2fb
8 files changed
+113
-45
No files matched your search
@@ -11,6 +11,7 @@ const CommentCard = forwardRef((props, ref) => {
|
||||
const { isAuth, user } = useContext(UserContext);
|
||||
|
||||
const deleteCommentById = async () => {
|
||||
props.manageComment.setLoadingComments(true);
|
||||
if (isAuth && user.token != undefined) {
|
||||
try {
|
||||
await api.delete(`/comments?commentId=${props.id}`, { headers: { 'Authorization': user.token } });
|
||||
@@ -20,6 +21,7 @@ const CommentCard = forwardRef((props, ref) => {
|
||||
props.manageComment.setCommentsData({ hasMore: props.manageComment.commentsData.hasMore, rows: newCommentsData.rows });
|
||||
} catch {}
|
||||
}
|
||||
props.manageComment.setLoadingComments(false);
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
Reference in new issue
Block a user