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. 15
      app/components/Contacts/Network.js

15
app/components/Contacts/Network.js

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

Loading…
Cancel
Save