diff --git a/konnectd/ui/src/components/Loading.js b/konnectd/ui/src/components/Loading.js index 65547a694..7dc4ef23a 100644 --- a/konnectd/ui/src/components/Loading.js +++ b/konnectd/ui/src/components/Loading.js @@ -32,46 +32,44 @@ const styles = theme => ({ } }); -class Loading extends React.PureComponent { - render() { - const { classes, error } = this.props; +function retry(event, dispatch) { + event.preventDefault(); - return ( - - - {renderIf(error === null)(() => ( - - ))} - {renderIf(error !== null)(() => ( -
- - - - - - - - -
- ))} -
+ dispatch(retryHello()); +} + +function Loading(props) { + const { classes, error } = props; + + return ( + + + {renderIf(error === null)(() => ( + + ))} + {renderIf(error !== null)(() => ( +
+ + + + + + + + +
+ ))}
- ); - } - - retry(event) { - event.preventDefault(); - - this.props.dispatch(retryHello()); - } +
+ ); } Loading.propTypes = {