From 13542f3165b878adc2877fa2a98ae110c0774b71 Mon Sep 17 00:00:00 2001 From: Daniel Chiquito Date: Thu, 19 May 2022 19:14:25 -0400 Subject: [PATCH] Add a Leave Channel button to PM page --- app/containers/mainPanel.js | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/app/containers/mainPanel.js b/app/containers/mainPanel.js index d54348f..305c599 100644 --- a/app/containers/mainPanel.js +++ b/app/containers/mainPanel.js @@ -217,6 +217,13 @@ class MainPanel extends Component { this.props.showChannelPanel({ addr }) } + onClickLeaveChannel (addr) { + leaveChannel({ + addr, + channel: currentChannel + }) + } + render () { const { cabal, channelMemberCount, settings } = this.props var self = this @@ -289,8 +296,13 @@ class MainPanel extends Component { - {!cabal.isChannelPrivate && ( -
+
+ {cabal.isChannelPrivate && ( + + )} + {!cabal.isChannelPrivate && (
-
- )} + )} +