Skip to content

Commit

Permalink
remove sentry tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieJ committed Jan 26, 2019
1 parent 31a2d8b commit 23470f4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
8 changes: 5 additions & 3 deletions site/theme/template/Layout/SentryBoundary.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import React, { Component } from 'react';
import * as Sentry from '@sentry/browser';

Sentry.init({
dsn: 'https://[email protected]/1375756',
});
// Temp remove sentry since this break the demo:
// https://github.com/ant-design/ant-design/issues/14576
// Sentry.init({
// dsn: 'https://[email protected]/1375756',
// });

export default class SentryBoundary extends Component {
state = { error: null };
Expand Down
20 changes: 9 additions & 11 deletions site/theme/template/Layout/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import 'moment/locale/zh-cn';
import { LocaleProvider } from 'antd';
import zhCN from 'antd/lib/locale-provider/zh_CN';
import Header from './Header';
import SentryBoundary from './SentryBoundary';
import enLocale from '../../en-US';
import cnLocale from '../../zh-CN';
import * as utils from '../utils';
Expand Down Expand Up @@ -95,17 +94,16 @@ export default class Layout extends React.Component {
const { children, ...restProps } = this.props;
const { appLocale } = this.state;

// Temp remove SentryBoundary
return (
<SentryBoundary>
<IntlProvider locale={appLocale.locale} messages={appLocale.messages}>
<LocaleProvider locale={appLocale.locale === 'zh-CN' ? zhCN : null}>
<div className="page-wrapper">
<Header {...restProps} />
{children}
</div>
</LocaleProvider>
</IntlProvider>
</SentryBoundary>
<IntlProvider locale={appLocale.locale} messages={appLocale.messages}>
<LocaleProvider locale={appLocale.locale === 'zh-CN' ? zhCN : null}>
<div className="page-wrapper">
<Header {...restProps} />
{children}
</div>
</LocaleProvider>
</IntlProvider>
);
}
}

0 comments on commit 23470f4

Please sign in to comment.