From 5d6164973e92fa8a3e3c18a0eb2e29494aea4f48 Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Sun, 9 Dec 2018 20:48:25 +0100 Subject: Fix linting issues --- src/components/util/ErrorBoundary/index.js | 18 ++++++++++++------ src/components/util/ErrorBoundary/styles.js | 4 ++-- 2 files changed, 14 insertions(+), 8 deletions(-) (limited to 'src/components/util') diff --git a/src/components/util/ErrorBoundary/index.js b/src/components/util/ErrorBoundary/index.js index def01c74f..5db0db226 100644 --- a/src/components/util/ErrorBoundary/index.js +++ b/src/components/util/ErrorBoundary/index.js @@ -1,8 +1,9 @@ import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import injectSheet from 'react-jss'; import { defineMessages, intlShape } from 'react-intl'; -import Button from '../../ui/Button'; +import Button from '../../ui/Button'; import styles from './styles'; @@ -22,16 +23,21 @@ export default @injectSheet(styles) class ErrorBoundary extends Component { hasError: false, } + static propTypes = { + classes: PropTypes.object.isRequired, + children: PropTypes.node.isRequired, + } + static contextTypes = { intl: intlShape, }; - componentDidCatch(error, info) { + componentDidCatch() { this.setState({ hasError: true }); } render() { - const { classes } = this.props; + const { classes } = this.props; const { intl } = this.context; if (this.state.hasError) { @@ -40,10 +46,10 @@ export default @injectSheet(styles) class ErrorBoundary extends Component {

{intl.formatMessage(messages.headline)}

-