diff --git a/src/renderer/component/common/busy-indicator.jsx b/src/renderer/component/common/busy-indicator.jsx index 759e91b5c0b..1dfae933206 100644 --- a/src/renderer/component/common/busy-indicator.jsx +++ b/src/renderer/component/common/busy-indicator.jsx @@ -5,10 +5,20 @@ type Props = { message: ?string, }; -const BusyIndicator = (props: Props) => ( - - {props.message} - -); +class BusyIndicator extends React.PureComponent { + static defaultProps = { + message: '', + }; + + render() { + const { message } = this.props; + + return ( + + {message} + + ); + } +} export default BusyIndicator; diff --git a/src/renderer/page/channel/view.jsx b/src/renderer/page/channel/view.jsx index dce2f70f847..da49f8e6a55 100644 --- a/src/renderer/page/channel/view.jsx +++ b/src/renderer/page/channel/view.jsx @@ -48,7 +48,7 @@ class ChannelPage extends React.PureComponent { this.props.navigate('/show', newParams); } - paginate(e, totalPages: number) { + paginate(e: SyntheticKeyboardEvent<*>, totalPages: number) { // Change page if enter was pressed, and the given page is between // the first and the last. const pageFromInput = Number(e.target.value); @@ -71,10 +71,8 @@ class ChannelPage extends React.PureComponent { const contentList = claimsInChannel && claimsInChannel.length ? ( - ) : !fetching ? ( - {__('No content found.')} ) : ( - null + !fetching && {__('No content found.')} ); return ( @@ -82,7 +80,7 @@ class ChannelPage extends React.PureComponent {

{name} - {fetching ? : null} + {fetching && }