diff --git a/templates/mellow-react/assets/js/pages/dashboard/profile.jsx b/templates/mellow-react/assets/js/pages/dashboard/profile.jsx index 733f47e..5855e7d 100644 --- a/templates/mellow-react/assets/js/pages/dashboard/profile.jsx +++ b/templates/mellow-react/assets/js/pages/dashboard/profile.jsx @@ -13,9 +13,9 @@ export default function Profile() { const { data, setData, ...form } = useForm({ email: loggedInUser.email, fullName: loggedInUser.fullName, - currentPassword: '', - password: '', - confirmPassword: '' + currentPassword: undefined, + password: undefined, + confirmPassword: undefined }) const { @@ -23,10 +23,11 @@ export default function Profile() { setData: setDeleteAccountData, ...deleteAccountForm } = useForm({ - password: '' + password: undefined }) - function updateProfile() { + function updateProfile(e) { + e.preventDefault() form.patch(`/profile`, { preserveScroll: true, preserveState: true,