From 6f49992d5789d8d10b01b7304b4f5a04514875da Mon Sep 17 00:00:00 2001 From: emizzle Date: Thu, 19 Dec 2019 17:37:58 +1100 Subject: [PATCH] fix(@embark/cockpit): Remove loading from ENS util Removed loading component from rendering as it was causing the ENS components to unmount and ultimately not show ENS results. --- packages/cockpit/ui/src/containers/EnsContainer.js | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/packages/cockpit/ui/src/containers/EnsContainer.js b/packages/cockpit/ui/src/containers/EnsContainer.js index 3e9f9df04..9a6a7198a 100644 --- a/packages/cockpit/ui/src/containers/EnsContainer.js +++ b/packages/cockpit/ui/src/containers/EnsContainer.js @@ -6,16 +6,15 @@ import {ensRecord, ensRecords} from "../actions"; import EnsRegister from "../components/EnsRegister"; import EnsLookup from "../components/EnsLookup"; import EnsResolve from "../components/EnsResolve"; -import Loading from "../components/Loading"; import PageHead from "../components/PageHead"; -import {getEnsRecords, isEnsEnabled, getEnsErrors, isLoading} from "../reducers/selectors"; +import {getEnsRecords, isEnsEnabled, getEnsErrors} from "../reducers/selectors"; class EnsContainer extends Component { componentDidMount() { // Fire off resolve to determine if ENS api endpoints have been registered. // This will tell us if ENS is enabled or not. - this.props.resolve(); + this.props.resolve("embark.eth"); } showEns() { @@ -40,8 +39,7 @@ class EnsContainer extends Component { render() { return ( - {this.props.isLoading && } - {!this.props.isLoading && this.props.isEnsEnabled ? this.showEns() : this.showWarning()} + {this.props.isEnsEnabled ? this.showEns() : this.showWarning()} ); } @@ -53,16 +51,14 @@ EnsContainer.propTypes = { lookup: PropTypes.func, register: PropTypes.func, isEnsEnabled: PropTypes.bool, - ensErrors: PropTypes.string, - isLoading: PropTypes.bool + ensErrors: PropTypes.string }; function mapStateToProps(state) { return { ensRecords: getEnsRecords(state), ensErrors: getEnsErrors(state), - isEnsEnabled: isEnsEnabled(state), - isLoading: isLoading(state) + isEnsEnabled: isEnsEnabled(state) }; }