[resumes][fix] fix invalidateQuery

pull/320/head
Terence Ho 3 years ago
parent f674d0dfa3
commit 26cfb89e33

@ -50,13 +50,18 @@ export default function CommentsForm({
// TODO: Give a feedback to the user if the action succeeds/fails
const onSubmit: SubmitHandler<IFormInput> = async (data) => {
await reviewCreateMutation.mutate({
return await reviewCreateMutation.mutate(
{
resumeId,
...data,
});
},
{
onSuccess: () => {
// Redirect back to comments section
setShowCommentsForm(false);
},
},
);
};
const onCancel = () => {

@ -27,7 +27,6 @@ export default function CommentsList({
]);
// TODO: Add loading prompt
console.log(commentsQuery.data);
return (
<div className="space-y-3">

Loading…
Cancel
Save