Connected password form to redux

This commit is contained in:
Daniel Cojocea committed 2024-07-10 18:26:05 -04:00
1 parent 9277a37559
commit 682b7b4d06
4 files changed
+40 -24

No files matched your search

+4 -2
View File
@@ -47,8 +47,10 @@ export const update = createAsyncThunk(
await new Promise((resolve) => setTimeout(resolve, 1500));
const fd = new FormData();
fd.append("firstname", form.firstname);
fd.append("lastname", form.lastname);
form.firstname && fd.append("firstname", form.firstname);
form.lastname && fd.append("lastname", form.lastname);
form.password && fd.append("password", form.password);
form.newPassword && fd.append("newPassword", form.newPassword);
if (form.file && form.file !== "") {
const imageResult = await axiosInstance.get(form.file, {
responseType: "blob",