mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Make loading screen more concise
This commit is contained in:
parent
003f1306d3
commit
d9af9986bb
@ -16,18 +16,18 @@ class LoadingScreen extends Component {
|
|||||||
|
|
||||||
renderMessage () {
|
renderMessage () {
|
||||||
const { loadingMessage } = this.props
|
const { loadingMessage } = this.props
|
||||||
if (isValidElement(loadingMessage)) {
|
|
||||||
return loadingMessage
|
if (!loadingMessage) {
|
||||||
|
return null
|
||||||
}
|
}
|
||||||
return loadingMessage
|
|
||||||
? <span>{loadingMessage}</span>
|
return isValidElement(loadingMessage) ? loadingMessage : <span>{loadingMessage}</span>
|
||||||
: null
|
|
||||||
}
|
}
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
return (
|
return (
|
||||||
<div className="loading-overlay">
|
<div className="loading-overlay">
|
||||||
{this.props.header && this.props.header}
|
{this.props.header}
|
||||||
<div className="loading-overlay__container">
|
<div className="loading-overlay__container">
|
||||||
{this.props.showLoadingSpinner && <Spinner color="#F7C06C" className="loading-overlay__spinner" />}
|
{this.props.showLoadingSpinner && <Spinner color="#F7C06C" className="loading-overlay__spinner" />}
|
||||||
{this.renderMessage()}
|
{this.renderMessage()}
|
||||||
|
Loading…
Reference in New Issue
Block a user