// @flow import React from 'react' import { Provider, connect } from 'react-redux' import { ConnectedRouter } from 'react-router-redux' import { fetchBlockHeight, lndSelectors } from 'reducers/lnd' import LndSyncing from 'components/LndSyncing' import Routes from '../routes' const mapDispatchToProps = { fetchBlockHeight } const mapStateToProps = state => ({ lnd: state.lnd, syncPercentage: lndSelectors.syncPercentage(state) }) type RootType = { store: {}, history: {} }; class Root extends React.Component { render() { const { store, history, lnd, fetchBlockHeight, syncPercentage } = this.props if (lnd.syncing) { return ( ) } return ( ) } } export default connect(mapStateToProps, mapDispatchToProps)(Root)