mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-23 07:38:07 -05:00
set errorboundary name tag everywhere ErrorBoundary is used
This commit is contained in:
parent
0f8eb638cc
commit
54f30fc944
4 changed files with 10 additions and 4 deletions
|
@ -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({
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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')
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue