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
No related branches found
No related tags found
No related merge requests found
......@@ -274,17 +274,18 @@ export default function EditCreateUserProfile(props) {
};
React.useEffect(() => {
setLoading(true);
const timer = setInterval(() => {
setProgress((oldProgress) => {
if (oldProgress === 100) {
return 0;
}
const diff = Math.random() * 10;
return Math.min(oldProgress + diff, 100);
});
}, 500);
if (!createUser) {
setLoading(true);
const timer = setInterval(() => {
setProgress((oldProgress) => {
if (oldProgress === 100) {
return 0;
}
const diff = Math.random() * 10;
return Math.min(oldProgress + diff, 100);
});
}, 500);
setUserName(props.username);
axios(
configApiCall(
......@@ -320,10 +321,11 @@ export default function EditCreateUserProfile(props) {
.catch((error) => {
console.log("Error fetching user : " + props.username + " " + error);
});
return () => {
clearInterval(timer);
};
}
return () => {
clearInterval(timer);
};
}, []);
const resizeFile = (file, outputFormat) =>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment