From c9dae37414402bda698df7f554511cd45f604b6b Mon Sep 17 00:00:00 2001 From: Mattermost Build Date: Thu, 18 Jun 2020 03:31:30 +0200 Subject: [PATCH] MM-25350 Hide 'Select Team' title on modal when error occurs (#4447) Co-authored-by: Amit Uttam --- app/components/root/root.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/components/root/root.js b/app/components/root/root.js index c24ca486e..a2d1a3121 100644 --- a/app/components/root/root.js +++ b/app/components/root/root.js @@ -61,10 +61,10 @@ export default class Root extends PureComponent { setTimeout(this.errorTeamsList, 200); return; } - this.navigateToTeamsPage('ErrorTeamsList'); + this.navigateToTeamsPage('ErrorTeamsList', true); } - navigateToTeamsPage = (screen) => { + navigateToTeamsPage = (screen, error = false) => { const {currentUrl, theme} = this.props; const {intl} = this.providerRef.getChildContext(); @@ -93,7 +93,10 @@ export default class Root extends PureComponent { }; } - const title = intl.formatMessage({id: 'mobile.routes.selectTeam', defaultMessage: 'Select Team'}); + let title = ''; + if (!error) { + title = intl.formatMessage({id: 'mobile.routes.selectTeam', defaultMessage: 'Select Team'}); + } resetToTeams(screen, title, passProps, options); }