Skip to content
Snippets Groups Projects
Commit 19652e29 authored by Larbi Gharib's avatar Larbi Gharib
Browse files

Create user regression

Change-Id: I89b169e3ebf4a831a3e2f2be096aa5ce0d96d356
parent b467a1a8
Branches
Tags
No related merge requests found
...@@ -274,6 +274,8 @@ export default function EditCreateUserProfile(props) { ...@@ -274,6 +274,8 @@ export default function EditCreateUserProfile(props) {
}; };
React.useEffect(() => { React.useEffect(() => {
if (!createUser) {
setLoading(true); setLoading(true);
const timer = setInterval(() => { const timer = setInterval(() => {
setProgress((oldProgress) => { setProgress((oldProgress) => {
...@@ -284,7 +286,6 @@ export default function EditCreateUserProfile(props) { ...@@ -284,7 +286,6 @@ export default function EditCreateUserProfile(props) {
return Math.min(oldProgress + diff, 100); return Math.min(oldProgress + diff, 100);
}); });
}, 500); }, 500);
if (!createUser) {
setUserName(props.username); setUserName(props.username);
axios( axios(
configApiCall( configApiCall(
...@@ -320,10 +321,11 @@ export default function EditCreateUserProfile(props) { ...@@ -320,10 +321,11 @@ export default function EditCreateUserProfile(props) {
.catch((error) => { .catch((error) => {
console.log("Error fetching user : " + props.username + " " + error); console.log("Error fetching user : " + props.username + " " + error);
}); });
}
return () => { return () => {
clearInterval(timer); clearInterval(timer);
}; };
}
}, []); }, []);
const resizeFile = (file, outputFormat) => const resizeFile = (file, outputFormat) =>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment