|
|
@ -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,
|
|
|
|
{
|
|
|
|
...data,
|
|
|
|
resumeId,
|
|
|
|
});
|
|
|
|
...data,
|
|
|
|
|
|
|
|
},
|
|
|
|
// Redirect back to comments section
|
|
|
|
{
|
|
|
|
setShowCommentsForm(false);
|
|
|
|
onSuccess: () => {
|
|
|
|
|
|
|
|
// Redirect back to comments section
|
|
|
|
|
|
|
|
setShowCommentsForm(false);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const onCancel = () => {
|
|
|
|
const onCancel = () => {
|
|
|
|