Browse Source

fix(channel-list): change the logic to look at the currentChannels

renovate/lint-staged-8.x
Jack Mallers 7 years ago
parent
commit
1c9a23b195
  1. 10
      app/components/Contacts/Network.js

10
app/components/Contacts/Network.js

@ -32,8 +32,7 @@ class Network extends Component {
filter, filter,
selectedChannel, selectedChannel,
loadingChannelPubkeys, loadingChannelPubkeys,
closingChannelIds, closingChannelIds
channels
}, },
currentChannels, currentChannels,
balance, balance,
@ -171,9 +170,10 @@ class Network extends Component {
<div className={styles.channels}> <div className={styles.channels}>
{!loadingChannelPubkeys.length && {!loadingChannelPubkeys.length &&
!channels.length && <SuggestedNodes {...suggestedNodesProps} />} !currentChannels.length &&
!searchQuery.length && <SuggestedNodes {...suggestedNodesProps} />}
{(loadingChannelPubkeys.length || channels.length) && ( {(loadingChannelPubkeys.length || currentChannels.length) && (
<header className={styles.listHeader}> <header className={styles.listHeader}>
<section> <section>
<h2 onClick={toggleFilterPulldown} className={styles.filterTitle}> <h2 onClick={toggleFilterPulldown} className={styles.filterTitle}>
@ -320,7 +320,7 @@ class Network extends Component {
})} })}
</ul> </ul>
</div> </div>
{(loadingChannelPubkeys.length || channels.length) && ( {(loadingChannelPubkeys.length || currentChannels.length || searchQuery.length) && (
<footer className={styles.search}> <footer className={styles.search}>
<label htmlFor="search" className={`${styles.label} ${styles.input}`}> <label htmlFor="search" className={`${styles.label} ${styles.input}`}>
<Isvg src={search} /> <Isvg src={search} />

Loading…
Cancel
Save