Browse Source

refactor: avoid repeating a conditional in Network

renovate/lint-staged-8.x
Ben Woosley 7 years ago
parent
commit
b15d68de18
No known key found for this signature in database GPG Key ID: 6EE5F3785F78B345
  1. 11
      app/components/Contacts/Network.js

11
app/components/Contacts/Network.js

@ -174,15 +174,10 @@ class Network extends Component {
</header>
<div className={styles.channels}>
{!loadingChannelPubkeys.length &&
!currentChannels.length &&
!channels.length &&
!searchQuery.length && <SuggestedNodes {...suggestedNodesProps} />}
{(loadingChannelPubkeys.length ||
{loadingChannelPubkeys.length ||
currentChannels.length ||
channels.length ||
searchQuery.length) && (
searchQuery.length ? (
<header className={styles.listHeader}>
<section>
<h2 onClick={toggleFilterPulldown} className={styles.filterTitle}>
@ -211,6 +206,8 @@ class Network extends Component {
</span>
</section>
</header>
) : (
<SuggestedNodes {...suggestedNodesProps} />
)}
<ul className={filterPulldown && styles.fade}>

Loading…
Cancel
Save