Unverified Commit 77f223e0 authored by afc163's avatar afc163

remove useless state loading

parent 0bbbcc72
......@@ -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,
......
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