import React, { Component } from 'react' import PropTypes from 'prop-types' import Isvg from 'react-inlinesvg' import zapLogo from 'icons/zap_logo.svg' import styles from './Syncing.scss' class Syncing extends Component { componentWillMount() { this.props.fetchBlockHeight() } render() { const { syncPercentage } = this.props return (

Syncing to the blockchain...

{Number.isNaN(parseInt(syncPercentage, 10)) || syncPercentage.toString().length === 0 ? '' : `${syncPercentage}%`}

) } } Syncing.propTypes = { fetchBlockHeight: PropTypes.func.isRequired, syncPercentage: PropTypes.oneOfType([ PropTypes.number, PropTypes.string ]).isRequired } export default Syncing