From a0c0a0685073dba64241a7b16c68f8f210fc8bf9 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Wed, 11 Mar 2020 14:38:43 -0700 Subject: [PATCH] BOD-40 #comment Form fixed to use new form methods. --- .../profile-my/profile-my.component.jsx | 55 +++++++------------ 1 file changed, 19 insertions(+), 36 deletions(-) diff --git a/client/src/components/profile-my/profile-my.component.jsx b/client/src/components/profile-my/profile-my.component.jsx index 4b388eab0..2f88a164b 100644 --- a/client/src/components/profile-my/profile-my.component.jsx +++ b/client/src/components/profile-my/profile-my.component.jsx @@ -16,57 +16,40 @@ const mapDispatchToProps = dispatch => ({ export default connect( mapStateToProps, mapDispatchToProps -)(function ProfileMyComponent({ - currentUser, - - updateUserDetails -}) { - const [form] = Form.useForm(); - const { isFieldsTouched, resetFields } = form; +)(function ProfileMyComponent({ currentUser, updateUserDetails }) { const { t } = useTranslation(); - const handleSubmit = e => { - e.preventDefault(); - - form.validateFieldsAndScroll((err, values) => { - if (err) { - notification["error"]({ - message: t("jobs.errors.validationtitle"), - description: t("jobs.errors.validation") - }); - } - if (!err) { - console.log("values", values); - updateUserDetails({ - displayName: values.displayname, - photoURL: values.photoURL - }); - } + const handleFinish = values => { + updateUserDetails({ + displayName: values.displayName, + photoURL: values.photoURL }); }; return (
- {isFieldsTouched() ? : null} - -
+ - ) + -