Commit 7c18b657 authored by afc163's avatar afc163

tweak loading timeout

parent 88b85407
......@@ -78,11 +78,11 @@ class Analysis extends Component {
dispatch({
type: 'chart/fetch',
});
setTimeout(() => {
this.timeoutId = setTimeout(() => {
this.setState({
loading: false,
});
}, 1000);
}, 600);
});
}
......@@ -92,6 +92,7 @@ class Analysis extends Component {
type: 'chart/clear',
});
cancelAnimationFrame(this.reqRef);
clearTimeout(this.timeoutId);
}
handleChangeSalesType = e => {
......
......@@ -18,7 +18,7 @@ const targetTime = new Date().getTime() + 3900000;
// use permission as a parameter
const havePermissionAsync = new Promise(resolve => {
// Call resolve on behalf of passed
setTimeout(() => resolve(), 100);
setTimeout(() => resolve(), 300);
});
@Secured(havePermissionAsync)
@connect(({ monitor, loading }) => ({
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment