diff --git a/__tests__/hooks/useHandleForm.js b/__tests__/hooks/useHandleForm.spec.js similarity index 100% rename from __tests__/hooks/useHandleForm.js rename to __tests__/hooks/useHandleForm.spec.js diff --git a/src/hooks/useHandleForm.js b/src/hooks/useHandleForm.js index 74c3b248..b52218b8 100644 --- a/src/hooks/useHandleForm.js +++ b/src/hooks/useHandleForm.js @@ -26,10 +26,9 @@ const useFormSubmission = ({ submitFunction, initialValue = {} } = {}) => { setSubmitResult(result); return result; } catch (err) { - // eslint-disable-next-line no-console - console.error(err); setExperiencedError(true); setIsSubmitting(false); + setSubmitResult(err); return err; } };