import React from 'react'; import PropTypes from 'prop-types'; import { Raven } from '../sentry'; import Message from './Message'; import AlertIcon from 'feather-icons/dist/icons/alert-octagon.svg'; class RavenError extends React.Component { componentDidMount() { const { error, details } = this.props; Raven.captureException(error, details); } reportError = event => { event.preventDefault(); if (Raven.lastEventId()) { Raven.showReportDialog(); } } render() { const { heading } = this.props; return

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

; } } RavenError.propTypes = { error: PropTypes.object.isRequired, details: PropTypes.object.isRequired, heading: PropTypes.string.isRequired }; export default RavenError;