()
| 30 | } |
| 31 | |
| 32 | render(): React.Node { |
| 33 | if (this.state.errorData.length > 0) { |
| 34 | const versionUnsupportedError = this.state.errorData.find(e => { |
| 35 | const messageForException = getMessageForException(e.error); |
| 36 | return ( |
| 37 | messageForException === 'client_version_unsupported' || |
| 38 | messageForException === 'unsupported_version' |
| 39 | ); |
| 40 | }); |
| 41 | |
| 42 | let message = 'Something has gone wrong, please reload the page'; |
| 43 | if (versionUnsupportedError) { |
| 44 | message = getVersionUnsupportedError(); |
| 45 | } |
| 46 | |
| 47 | return ( |
| 48 | <div className={css.container}> |
| 49 | <h3>{message}</h3> |
| 50 | </div> |
| 51 | ); |
| 52 | } |
| 53 | return this.props.children; |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | export default ErrorBoundary; |
nothing calls this directly
no test coverage detected