diff --git a/src/components/Authorized/PromiseRender.js b/src/components/Authorized/PromiseRender.js index ec7890ccf2c1d2ea3b7c1c61e83ecb6a3d0a039c..78f762d92870fa282bb5b64ec2de9ef1d76d221c 100644 --- a/src/components/Authorized/PromiseRender.js +++ b/src/components/Authorized/PromiseRender.js @@ -2,38 +2,38 @@ import React from 'react'; import { Spin } from 'antd'; export default class PromiseRender extends React.PureComponent { - state = { - component: false, - }; - async componentDidMount() { - this.props.promise - .then(() => { - this.setState({ - component: this.props.ok, - }); - }) - .catch(() => { - this.setState({ - component: this.props.error, - }); + state = { + component: false, + }; + async componentDidMount() { + this.props.promise + .then(() => { + this.setState({ + component: this.props.ok, }); - } - render() { - const C = this.state.component; - return C ? ( - - ) : ( -
- -
- ); - } + }) + .catch(() => { + this.setState({ + component: this.props.error, + }); + }); + } + render() { + const C = this.state.component; + return C ? ( + + ) : ( +
+ +
+ ); + } }