[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 // TODO: Give a feedback to the user if the action succeeds/fails
const onSubmit: SubmitHandler<IFormInput> = async (data) => { const onSubmit: SubmitHandler<IFormInput> = async (data) => {
await reviewCreateMutation.mutate({ return await reviewCreateMutation.mutate(
{
resumeId, resumeId,
...data, ...data,
}); },
{
onSuccess: () => {
// Redirect back to comments section // Redirect back to comments section
setShowCommentsForm(false); setShowCommentsForm(false);
},
},
);
}; };
const onCancel = () => { const onCancel = () => {

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

Loading…
Cancel
Save