Skip to content
Permalink
Browse files

chore: change matchedCryptos initialization logic

  • Loading branch information...
mkczarkowski committed May 14, 2018
1 parent a85704e commit 7a579120f5d680b29e2abe54c1ea279f4a149fab
Showing with 2 additions and 6 deletions.
  1. +2 −6 src/containers/App.js
@@ -45,15 +45,11 @@ class App extends Component {
supply: 147379083734,
},
],
matchedCryptos: [],
matchedCryptos: null,
marketCap: 376097583984,
searchQuery: '',
};

componentWillMount() {
this.setMatchedCryptos();
}

getIconPath(acronym) {
return `${window.location.origin}/icons/${acronym.toLowerCase()}.png`;
}
@@ -85,7 +81,7 @@ class App extends Component {
handleChange={this.searchChangedHandler}
searchQuery={this.state.searchQuery}
/>
<CoinList cryptos={this.state.matchedCryptos} />
<CoinList cryptos={this.state.matchedCryptos !== null ? this.state.matchedCryptos : this.state.cryptos} />
</div>
);
}

0 comments on commit 7a57912

Please sign in to comment.
You can’t perform that action at this time.