@ -59,7 +59,10 @@ class ErrorBoundary extends React.Component<PropsType> {
if (error) {
return (
<div>
<h2>Something went wrong!</h2>
<PrettyError error={this.state.error} />
</div>
);
}
return this.props.children;
@ -2,12 +2,10 @@ import * as React from 'react';
export const PrettyError = React.memo((props: any) => (
<pre style={{ fontWeight: 'bold' }}>
<pre>
{props.error.message}
</pre>
<h3>Stack trace:</h3>
{props.error.stack}