mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-03 00:33:49 +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 {
|
||||
dispatch(setProfileBackground(null));
|
||||
window.localStorage.setItem(
|
||||
"userDetails",
|
||||
JSON.stringify({ ...userDetails })
|
||||
);
|
||||
|
||||
window.localStorage.setItem("userDetails", JSON.stringify(userDetails));
|
||||
}
|
||||
},
|
||||
[dispatch]
|
||||
|
@ -49,7 +49,10 @@ export const UserEditProfileModal = ({
|
||||
}
|
||||
};
|
||||
|
||||
const handleSaveProfile = async () => {
|
||||
const handleSaveProfile: React.FormEventHandler<HTMLFormElement> = async (
|
||||
event
|
||||
) => {
|
||||
event.preventDefault();
|
||||
setIsSaving(true);
|
||||
|
||||
patchUser(displayName, newImagePath)
|
||||
|
Loading…
Reference in New Issue
Block a user