Skip to content

Commit

Permalink
fix(mellow-react): changed to undefined for forms
Browse files Browse the repository at this point in the history
  • Loading branch information
DominusKelvin committed Sep 20, 2024
1 parent 286bd38 commit b3fb75c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions templates/mellow-react/assets/js/pages/dashboard/profile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,21 @@ 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 {
data: deleteAccountData,
setData: setDeleteAccountData,
...deleteAccountForm
} = useForm({
password: ''
password: undefined
})

function updateProfile() {
function updateProfile(e) {
e.preventDefault()
form.patch(`/profile`, {
preserveScroll: true,
preserveState: true,
Expand Down

0 comments on commit b3fb75c

Please sign in to comment.