clear profileBackground if there is no image

This commit is contained in:
Zamitto 2024-06-19 00:31:13 -03:00
parent 50d9b9f022
commit 191023ac38

View File

@ -44,6 +44,12 @@ export function useUserDetails() {
"userDetails",
JSON.stringify({ ...userDetails, profileBackground })
);
} else {
dispatch(setProfileBackground(null));
window.localStorage.setItem(
"userDetails",
JSON.stringify({ ...userDetails })
);
}
},
[dispatch]