Clear unchanged error when picture is modified
This commit is contained in:
1 parent
91abe374f6
commit
e2b9a6fa16
1 file changed
+3
@@ -23,6 +23,7 @@ import ProgressUpload from "../../ProgressBars";
|
|||||||
import { formatBytes } from "../../../Utils/fileUtils";
|
import { formatBytes } from "../../../Utils/fileUtils";
|
||||||
import { clearMonitorState } from "../../../Features/Monitors/monitorsSlice";
|
import { clearMonitorState } from "../../../Features/Monitors/monitorsSlice";
|
||||||
import { createToast } from "../../../Utils/toastUtils";
|
import { createToast } from "../../../Utils/toastUtils";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ProfilePanel component displays a form for editing user profile information
|
* ProfilePanel component displays a form for editing user profile information
|
||||||
* and allows for actions like updating profile picture, credentials,
|
* and allows for actions like updating profile picture, credentials,
|
||||||
@@ -152,6 +153,7 @@ const ProfilePanel = () => {
|
|||||||
deleteProfileImage: false,
|
deleteProfileImage: false,
|
||||||
}));
|
}));
|
||||||
setIsOpen("");
|
setIsOpen("");
|
||||||
|
errors["unchanged"] && clearError("unchanged");
|
||||||
};
|
};
|
||||||
|
|
||||||
// Handles form submission to update user profile
|
// Handles form submission to update user profile
|
||||||
@@ -194,6 +196,7 @@ const ProfilePanel = () => {
|
|||||||
...prev,
|
...prev,
|
||||||
deleteProfileImage: true,
|
deleteProfileImage: true,
|
||||||
}));
|
}));
|
||||||
|
errors["unchanged"] && clearError("unchanged");
|
||||||
};
|
};
|
||||||
|
|
||||||
// Initiates the account deletion process
|
// Initiates the account deletion process
|
||||||
|
|||||||
Reference in new issue
Block a user