[MM-38310][MM-38313][MM-38315] Fixed some issues caused by having multiple tabs (#1722)

* [MM-38313][MM-38315] Fixed some issues caused by having multiple tabs

* [MM-38310] Make sure notification navigates to correct tab
This commit is contained in:
Devin Binnie
2021-09-03 14:55:52 -04:00
committed by GitHub
parent 3213a16774
commit cfc0613d0f
12 changed files with 49 additions and 20 deletions

View File

@@ -102,7 +102,7 @@ export default class MainPage extends React.PureComponent<Props, State> {
this.threeDotMenu = React.createRef();
const firstServer = this.props.teams.find((team) => team.order === 0);
const firstTab = firstServer?.tabs.find((tab) => tab.order === (firstServer.lastActiveTab || 0)) || firstServer?.tabs[0];
const firstTab = firstServer?.tabs.find((tab, index) => index === (firstServer.lastActiveTab || 0)) || firstServer?.tabs[0];
this.state = {
activeServerName: firstServer?.name,

View File

@@ -101,7 +101,7 @@ export default class TabBar extends React.PureComponent<Props> {
as='li'
id={`teamTabItem${index}`}
draggable={false}
title={tab.name}
title={getTabDisplayName(tab.name as TabType)}
className={classNames('teamTabItem', {
active: this.props.activeTabName === tab.name,
dragging: snapshot.isDragging,