mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-03-14 15:09:59 -04:00
renamed ErrorBoundary prop name to componentName
This commit is contained in:
parent
46660a2ff9
commit
226134bc81
5 changed files with 8 additions and 8 deletions
|
@ -18,8 +18,8 @@ class ErrorBoundary extends React.Component {
|
|||
// Display fallback UI
|
||||
Sentry.withScope(scope => {
|
||||
scope.setTag('project', 'scratch-www');
|
||||
if (this.props.name) {
|
||||
scope.setTag('component', this.props.name);
|
||||
if (this.props.componentName) {
|
||||
scope.setTag('component', this.props.componentName);
|
||||
}
|
||||
Object.keys(errorInfo).forEach(key => {
|
||||
scope.setExtra(key, errorInfo[key]);
|
||||
|
@ -51,7 +51,7 @@ class ErrorBoundary extends React.Component {
|
|||
}
|
||||
ErrorBoundary.propTypes = {
|
||||
children: PropTypes.node,
|
||||
name: PropTypes.string
|
||||
componentName: PropTypes.string
|
||||
};
|
||||
|
||||
module.exports = ErrorBoundary;
|
||||
|
|
|
@ -10,7 +10,7 @@ const Page = ({
|
|||
children,
|
||||
className
|
||||
}) => (
|
||||
<ErrorBoundary name="Page">
|
||||
<ErrorBoundary componentName="Page">
|
||||
<div className={classNames('page', className)}>
|
||||
<div
|
||||
className={classNames({
|
||||
|
|
|
@ -10,7 +10,7 @@ initSentry();
|
|||
|
||||
require('./join.scss');
|
||||
const Register = () => (
|
||||
<ErrorBoundary name="Join">
|
||||
<ErrorBoundary componentName="Join">
|
||||
<div className="join">
|
||||
<a
|
||||
aria-label="Scratch"
|
||||
|
|
|
@ -13,7 +13,7 @@ const UnsupportedBrowser = require('./unsupported-browser.jsx');
|
|||
if (isSupportedBrowser()) {
|
||||
const EmbedView = require('./embed-view.jsx');
|
||||
render(
|
||||
<ErrorBoundary name="EmbedView">
|
||||
<ErrorBoundary componentName="EmbedView">
|
||||
<EmbedView.View />
|
||||
</ErrorBoundary>,
|
||||
document.getElementById('app'),
|
||||
|
@ -29,7 +29,7 @@ if (isSupportedBrowser()) {
|
|||
);
|
||||
} else {
|
||||
render(
|
||||
<ErrorBoundary name="UnsupportedBrowser"><UnsupportedBrowser /></ErrorBoundary>,
|
||||
<ErrorBoundary componentName="UnsupportedBrowser"><UnsupportedBrowser /></ErrorBoundary>,
|
||||
document.getElementById('app')
|
||||
);
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ describe('ErrorBoundary', () => {
|
|||
beforeEach(() => {
|
||||
errorBoundaryWrapper = mountWithIntl(
|
||||
<ErrorBoundary
|
||||
name="TestEBName"
|
||||
componentName="TestEBName"
|
||||
>
|
||||
<ChildClass id="childClass" />
|
||||
</ErrorBoundary>
|
||||
|
|
Loading…
Reference in a new issue