diff --git a/src/components/SentryError/index.js b/src/components/SentryError/index.js index fe05ad8..798ee23 100644 --- a/src/components/SentryError/index.js +++ b/src/components/SentryError/index.js @@ -5,26 +5,22 @@ import { withNamespaces, Trans } from 'react-i18next'; import Message from 'components/Message'; -export class SentryError extends React.Component { - reportError = event => { - event.preventDefault(); +const reportError = event => { + event.preventDefault(); - if (Sentry.lastEventId()) { - Sentry.showReportDialog(); - } + if (Sentry.lastEventId()) { + Sentry.showReportDialog(); } +}; - render() { - const { t } = this.props; - - return -

- This error has been logged. You may also fill out a report. -

-
; - } -} +export const SentryError = ({ t }) => ( + +

+ This error has been logged. You may also fill out a report. +

+
+); SentryError.propTypes = { t: PropTypes.func.isRequired