diff --git a/ui/app/components/ui/loading-screen/loading-screen.component.js b/ui/app/components/ui/loading-screen/loading-screen.component.js index 6b843cfee..b3fb3308d 100644 --- a/ui/app/components/ui/loading-screen/loading-screen.component.js +++ b/ui/app/components/ui/loading-screen/loading-screen.component.js @@ -1,31 +1,33 @@ -const { Component } = require('react') -const h = require('react-hyperscript') +import React, {Component} from 'react' const PropTypes = require('prop-types') const Spinner = require('../spinner') class LoadingScreen extends Component { + static defaultProps = { + loadingMessage: null, + } + + static propTypes = { + loadingMessage: PropTypes.string, + } + renderMessage () { const { loadingMessage } = this.props - return loadingMessage && h('span', loadingMessage) + return loadingMessage + ? {loadingMessage} + : null } render () { return ( - h('.loading-overlay', [ - h('.loading-overlay__container', [ - h(Spinner, { - color: '#F7C06C', - }), - - this.renderMessage(), - ]), - ]) +
+
+ + {this.renderMessage()} +
+
) } } -LoadingScreen.propTypes = { - loadingMessage: PropTypes.string, -} - module.exports = LoadingScreen