diff --git a/src/pages/Dashboard/Analysis.js b/src/pages/Dashboard/Analysis.js index 609bf199d2a6092c7781660a295ce65489a70865..827001353b2f2b6db7ed5addbd520a308756acea 100644 --- a/src/pages/Dashboard/Analysis.js +++ b/src/pages/Dashboard/Analysis.js @@ -18,7 +18,6 @@ const OfflineData = React.lazy(() => import('./OfflineData')); })) class Analysis extends Component { state = { - loading: true, salesType: 'all', currentTabKey: '', rangePickerValue: getTimeDistance('year'), @@ -31,11 +30,6 @@ class Analysis extends Component { type: 'chart/fetch', }); }); - setTimeout(() => { - this.setState({ - loading: false, - }); - }, 2000); } componentWillUnmount() { @@ -96,9 +90,8 @@ class Analysis extends Component { }; render() { - const { rangePickerValue, salesType, currentTabKey, loading: stateLoading } = this.state; - const { chart, loading: propsLoading } = this.props; - const loading = stateLoading || propsLoading; + const { rangePickerValue, salesType, currentTabKey } = this.state; + const { chart, loading } = this.props; const { visitData, visitData2,