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>
</div>
<div className={styles.actions}>
<section onClick={() => removeClicked(channel)}>
{
closingChannelIds.includes(channel.chan_id) ?
<span className={`${styles.loading} hint--left`} data-hint='closing'>
<i>Closing</i> <i className={`${styles.spinner} ${styles.closing}`} />
</span>
:
closingChannelIds.includes(channel.chan_id) &&
<section>
<span className={`${styles.loading} hint--left`} data-hint='closing'>
<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>
</section>
}
</section>
</div>
</section>
</li>

Loading…
Cancel
Save