Browse Source

fix(disconnect): only show disconnect when channel is established

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

18
app/components/Contacts/Network.js

@ -257,16 +257,20 @@ class Network extends Component {
</section> </section>
</div> </div>
<div className={styles.actions}> <div className={styles.actions}>
<section onClick={() => removeClicked(channel)}>
{ {
closingChannelIds.includes(channel.chan_id) ? closingChannelIds.includes(channel.chan_id) &&
<span className={`${styles.loading} hint--left`} data-hint='closing'> <section>
<i>Closing</i> <i className={`${styles.spinner} ${styles.closing}`} /> <span className={`${styles.loading} hint--left`} data-hint='closing'>
</span> <i>Closing</i> <i className={`${styles.spinner} ${styles.closing}`} />
: </span>
</section>
}
{
(Object.prototype.hasOwnProperty.call(channel, 'active') && !closingChannelIds.includes(channel.chan_id)) &&
<section onClick={() => removeClicked(channel)}>
<div>Disconnect</div> <div>Disconnect</div>
</section>
} }
</section>
</div> </div>
</section> </section>
</li> </li>

Loading…
Cancel
Save