()
| 13 | } |
| 14 | |
| 15 | render() { |
| 16 | const { children, errorTitle } = this.props; |
| 17 | |
| 18 | if (!!this.state.error) { |
| 19 | return ( |
| 20 | <ErrorSection |
| 21 | title={errorTitle} |
| 22 | description={this.state.error.toString()} |
| 23 | /> |
| 24 | ); |
| 25 | } |
| 26 | return children; |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | export default ErrorBoundary; |