add mui lab and @resolver/yup for react hook form package and complete change password part with validation and test proccess

This commit is contained in:
2024-08-24 14:39:04 +03:30
parent c2e0420b79
commit 52e7fae709
5 changed files with 144 additions and 43 deletions

View File

@@ -0,0 +1,12 @@
export const flattenObjectOfObjects = (obj, res = {}) => {
for (let key in obj) {
if (obj.hasOwnProperty(key)) {
if (typeof obj[key] === "object" && obj[key] !== null) {
flattenObjectOfObjects(obj[key], res);
} else {
res[key] = obj[key];
}
}
}
return res;
};