MCPcopy Create free account
hub / github.com/CommE2E/comm / render

Method render

web/error-boundary.react.js:32–54  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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
57export default ErrorBoundary;

Callers

nothing calls this directly

Calls 2

getMessageForExceptionFunction · 0.90

Tested by

no test coverage detected