1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-23 02:10:12 +01:00

Merge pull request #9626 from darkwing/loading-screen-update

Make loading screen more concise
This commit is contained in:
David Walsh 2020-10-21 10:40:39 -05:00 committed by GitHub
commit 6e7a8428d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,18 +16,18 @@ class LoadingScreen extends Component {
renderMessage () {
const { loadingMessage } = this.props
if (isValidElement(loadingMessage)) {
return loadingMessage
if (!loadingMessage) {
return null
}
return loadingMessage
? <span>{loadingMessage}</span>
: null
return isValidElement(loadingMessage) ? loadingMessage : <span>{loadingMessage}</span>
}
render () {
return (
<div className="loading-overlay">
{this.props.header && this.props.header}
{this.props.header}
<div className="loading-overlay__container">
{this.props.showLoadingSpinner && <Spinner color="#F7C06C" className="loading-overlay__spinner" />}
{this.renderMessage()}