set errorboundary name tag everywhere ErrorBoundary is used

This commit is contained in:
Ben Wheeler 2019-10-09 22:30:59 -04:00
parent 0f8eb638cc
commit 54f30fc944
4 changed files with 10 additions and 4 deletions

View file

@ -10,7 +10,7 @@ const Page = ({
children,
className
}) => (
<ErrorBoundary>
<ErrorBoundary name="page">
<div className={classNames('page', className)}>
<div
className={classNames({

View file

@ -5,9 +5,12 @@ const ErrorBoundary = require('../../components/errorboundary/errorboundary.jsx'
// Require this even though we don't use it because, without it, webpack runs out of memory...
const Page = require('../../components/page/www/page.jsx'); // eslint-disable-line no-unused-vars
const initSentry = require('../../lib/sentry.js');
initSentry();
require('./join.scss');
const Register = () => (
<ErrorBoundary>
<ErrorBoundary name="join">
<div className="join">
<a
aria-label="Scratch"

View file

@ -35,7 +35,7 @@ class EmbedView extends React.Component {
render () {
if (this.props.projectNotAvailable || this.state.invalidProject) {
return (
<ErrorBoundary>
<ErrorBoundary name="embed">
<div className="preview">
<NotAvailable />
</div>

View file

@ -26,5 +26,8 @@ if (isSupportedBrowser()) {
EmbedView.guiMiddleware
);
} else {
render(<ErrorBoundary><UnsupportedBrowser /></ErrorBoundary>, document.getElementById('app'));
render(
<ErrorBoundary name="unsupportedbrowser"><UnsupportedBrowser /></ErrorBoundary>,
document.getElementById('app')
);
}