diff --git a/src/components/Charts/ChartCard/index.js b/src/components/Charts/ChartCard/index.js
index 5624f21f2cf91edac66df157df9dc69169f9da1e..2a486d681f3ba59ab7fcb46003afaf4cca3c5379 100644
--- a/src/components/Charts/ChartCard/index.js
+++ b/src/components/Charts/ChartCard/index.js
@@ -3,7 +3,9 @@ import { Card, Spin } from 'antd';
import styles from './index.less';
-const ChartCard = ({ loading, contentHeight, title, action, total, footer, children, ...rest }) => {
+const ChartCard = ({
+ loading = false, contentHeight, title, action, total, footer, children, ...rest
+}) => {
const content = (
@@ -34,11 +36,7 @@ const ChartCard = ({ loading, contentHeight, title, action, total, footer, child
bodyStyle={{ padding: '20px 24px 8px 24px' }}
{...rest}
>
- {
- loading ? (
- {content}
- ) : content
- }
+ {{content}}
);
};
diff --git a/src/routes/Dashboard/Analysis.js b/src/routes/Dashboard/Analysis.js
index 00e4b80f6dfff42da5e6063f74a7438604ef9f3a..703ef77452b102133b7ac76b79234000afee7d76 100644
--- a/src/routes/Dashboard/Analysis.js
+++ b/src/routes/Dashboard/Analysis.js
@@ -36,11 +36,7 @@ export default class Analysis extends Component {
componentDidMount() {
this.props.dispatch({
type: 'chart/fetch',
- }).then(() => {
- this.setState({
- loading: false,
- });
- });
+ }).then(() => this.setState({ loading: false }));
}
componentWillUnmount() {
@@ -226,7 +222,6 @@ export default class Analysis extends Component {
}
@@ -244,7 +239,6 @@ export default class Analysis extends Component {
}
@@ -261,7 +255,6 @@ export default class Analysis extends Component {
}
@@ -277,7 +270,6 @@ export default class Analysis extends Component {
}