Fix unnecessary object structuring

This commit is contained in:
Dane Everitt 2020-10-22 21:33:06 -07:00
parent 7ed3c25d61
commit 23872b844a
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53
3 changed files with 4 additions and 4 deletions

View File

@ -91,7 +91,7 @@ const EnhancedForm = withFormik<Props, Values>({
.catch(error => { .catch(error => {
console.error(error); console.error(error);
setSubmitting(false); setSubmitting(false);
clearAndAddHttpError({ error: error }); clearAndAddHttpError({ error });
}); });
}, },

View File

@ -27,7 +27,7 @@ export default ({ ...props }: RequiredModalProps) => {
.catch(error => { .catch(error => {
console.error(error); console.error(error);
clearAndAddHttpError({ error: error, key: 'account:two-factor' }); clearAndAddHttpError({ error, key: 'account:two-factor' });
setSubmitting(false); setSubmitting(false);
}); });
}; };

View File

@ -28,7 +28,7 @@ export default ({ onDismissed, ...props }: RequiredModalProps) => {
.then(setToken) .then(setToken)
.catch(error => { .catch(error => {
console.error(error); console.error(error);
clearAndAddHttpError({ error: error, key: 'account:two-factor' }); clearAndAddHttpError({ error, key: 'account:two-factor' });
}); });
}, []); }, []);
@ -40,7 +40,7 @@ export default ({ onDismissed, ...props }: RequiredModalProps) => {
.catch(error => { .catch(error => {
console.error(error); console.error(error);
clearAndAddHttpError({ error: error, key: 'account:two-factor' }); clearAndAddHttpError({ error, key: 'account:two-factor' });
}) })
.then(() => setSubmitting(false)); .then(() => setSubmitting(false));
}; };