mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-23 07:38:07 -05:00
redo sentry tag key and values, move ErrorBoundary around embed
This commit is contained in:
parent
487ca236be
commit
91a05d636f
5 changed files with 10 additions and 11 deletions
|
@ -19,7 +19,7 @@ class ErrorBoundary extends React.Component {
|
|||
Sentry.withScope(scope => {
|
||||
scope.setTag('project', 'scratch-www');
|
||||
if (this.props.name) {
|
||||
scope.setTag('errorboundary', this.props.name);
|
||||
scope.setTag('component', this.props.name);
|
||||
}
|
||||
Object.keys(errorInfo).forEach(key => {
|
||||
scope.setExtra(key, errorInfo[key]);
|
||||
|
|
|
@ -10,7 +10,7 @@ const Page = ({
|
|||
children,
|
||||
className
|
||||
}) => (
|
||||
<ErrorBoundary name="page">
|
||||
<ErrorBoundary name="Page">
|
||||
<div className={classNames('page', className)}>
|
||||
<div
|
||||
className={classNames({
|
||||
|
|
|
@ -10,7 +10,7 @@ initSentry();
|
|||
|
||||
require('./join.scss');
|
||||
const Register = () => (
|
||||
<ErrorBoundary name="join">
|
||||
<ErrorBoundary name="Join">
|
||||
<div className="join">
|
||||
<a
|
||||
aria-label="Scratch"
|
||||
|
|
|
@ -5,7 +5,6 @@ const PropTypes = require('prop-types');
|
|||
const connect = require('react-redux').connect;
|
||||
const injectIntl = require('react-intl').injectIntl;
|
||||
|
||||
const ErrorBoundary = require('../../components/errorboundary/errorboundary.jsx');
|
||||
const projectShape = require('./projectshape.jsx').projectShape;
|
||||
const NotAvailable = require('../../components/not-available/not-available.jsx');
|
||||
const Meta = require('./meta.jsx');
|
||||
|
@ -35,11 +34,9 @@ class EmbedView extends React.Component {
|
|||
render () {
|
||||
if (this.props.projectNotAvailable || this.state.invalidProject) {
|
||||
return (
|
||||
<ErrorBoundary name="embed">
|
||||
<div className="preview">
|
||||
<NotAvailable />
|
||||
</div>
|
||||
</ErrorBoundary>
|
||||
<div className="preview">
|
||||
<NotAvailable />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,9 @@ const UnsupportedBrowser = require('./unsupported-browser.jsx');
|
|||
if (isSupportedBrowser()) {
|
||||
const EmbedView = require('./embed-view.jsx');
|
||||
render(
|
||||
<EmbedView.View />,
|
||||
<ErrorBoundary name="EmbedView">
|
||||
<EmbedView.View />
|
||||
</ErrorBoundary>,
|
||||
document.getElementById('app'),
|
||||
{
|
||||
preview: previewActions.previewReducer,
|
||||
|
@ -27,7 +29,7 @@ if (isSupportedBrowser()) {
|
|||
);
|
||||
} else {
|
||||
render(
|
||||
<ErrorBoundary name="unsupportedbrowser"><UnsupportedBrowser /></ErrorBoundary>,
|
||||
<ErrorBoundary name="UnsupportedBrowser"><UnsupportedBrowser /></ErrorBoundary>,
|
||||
document.getElementById('app')
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue