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

12
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) &&
<section>
<span className={`${styles.loading} hint--left`} data-hint='closing'> <span className={`${styles.loading} hint--left`} data-hint='closing'>
<i>Closing</i> <i className={`${styles.spinner} ${styles.closing}`} /> <i>Closing</i> <i className={`${styles.spinner} ${styles.closing}`} />
</span> </span>
: </section>
<div>Disconnect</div>
} }
{
(Object.prototype.hasOwnProperty.call(channel, 'active') && !closingChannelIds.includes(channel.chan_id)) &&
<section onClick={() => removeClicked(channel)}>
<div>Disconnect</div>
</section> </section>
}
</div> </div>
</section> </section>
</li> </li>

Loading…
Cancel
Save