mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-03 08:43:48 +03:00
fix: preventing page reload on form submit
This commit is contained in:
parent
1fb1c9e81a
commit
61c5fc3957
@ -46,10 +46,8 @@ export function useUserDetails() {
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
dispatch(setProfileBackground(null));
|
dispatch(setProfileBackground(null));
|
||||||
window.localStorage.setItem(
|
|
||||||
"userDetails",
|
window.localStorage.setItem("userDetails", JSON.stringify(userDetails));
|
||||||
JSON.stringify({ ...userDetails })
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[dispatch]
|
[dispatch]
|
||||||
|
@ -49,7 +49,10 @@ export const UserEditProfileModal = ({
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleSaveProfile = async () => {
|
const handleSaveProfile: React.FormEventHandler<HTMLFormElement> = async (
|
||||||
|
event
|
||||||
|
) => {
|
||||||
|
event.preventDefault();
|
||||||
setIsSaving(true);
|
setIsSaving(true);
|
||||||
|
|
||||||
patchUser(displayName, newImagePath)
|
patchUser(displayName, newImagePath)
|
||||||
|
Loading…
Reference in New Issue
Block a user