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, children,
className className
}) => ( }) => (
<ErrorBoundary> <ErrorBoundary name="page">
<div className={classNames('page', className)}> <div className={classNames('page', className)}>
<div <div
className={classNames({ 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... // 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 Page = require('../../components/page/www/page.jsx'); // eslint-disable-line no-unused-vars
const initSentry = require('../../lib/sentry.js');
initSentry();
require('./join.scss'); require('./join.scss');
const Register = () => ( const Register = () => (
<ErrorBoundary> <ErrorBoundary name="join">
<div className="join"> <div className="join">
<a <a
aria-label="Scratch" aria-label="Scratch"

View file

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

View file

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