From 711cac5876cf2f330ad244167489d0345b41ef07 Mon Sep 17 00:00:00 2001 From: Reinaldo Neto <47038980+reinaldonetof@users.noreply.github.com> Date: Tue, 1 Nov 2022 14:09:00 -0300 Subject: [PATCH] [FIX] Cancelling when adding a server (#4565) * TC-110 [FIX] Cancelling when adding a server * Removing the close button when connecting to a server --- app/views/NewServerView/index.tsx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/app/views/NewServerView/index.tsx b/app/views/NewServerView/index.tsx index 12a3bc8a7..7bb3d0874 100644 --- a/app/views/NewServerView/index.tsx +++ b/app/views/NewServerView/index.tsx @@ -116,12 +116,21 @@ class NewServerView extends React.Component) { + if (prevProps.connecting !== this.props.connecting) { + this.setHeader(); + } + } + setHeader = () => { - const { previousServer, navigation } = this.props; + const { previousServer, navigation, connecting } = this.props; if (previousServer) { return navigation.setOptions({ headerTitle: I18n.t('Workspaces'), - headerLeft: () => + headerLeft: () => + !connecting ? ( + + ) : null }); } @@ -162,6 +171,7 @@ class NewServerView extends React.Component { const { dispatch, previousServer } = this.props; + dispatch(inviteLinksClear()); if (previousServer) { dispatch(selectServerRequest(previousServer));