Commit b65aae31 authored by Christopher Speller's avatar Christopher Speller Committed by GitHub

Removing some flux store usage. (#1897)

parent 9e2c0555
......@@ -11,7 +11,6 @@ import {localizeMessage} from 'utils/utils.jsx';
export default class RhsHeaderPost extends React.Component {
static propTypes = {
isWebrtc: PropTypes.bool,
previousRhsState: PropTypes.oneOf(
Object.values(RHSStates)
),
......@@ -28,11 +27,6 @@ export default class RhsHeaderPost extends React.Component {
handleBack = (e) => {
e.preventDefault();
if (this.props.isWebrtc) {
this.props.actions.showSearchResults();
return;
}
switch (this.props.previousRhsState) {
case RHSStates.SEARCH:
this.props.actions.showSearchResults();
......@@ -96,18 +90,6 @@ export default class RhsHeaderPost extends React.Component {
</Tooltip>
);
break;
default:
if (this.props.isWebrtc) {
backToResultsTooltip = (
<Tooltip id='backToResultsTooltip'>
<FormattedMessage
id='rhs_header.backToCallTooltip'
defaultMessage='Back to Call'
/>
</Tooltip>
);
}
break;
}
const expandSidebarTooltip = (
......
......@@ -10,7 +10,6 @@ import {Posts} from 'mattermost-redux/constants';
import PreferenceStore from 'stores/preference_store.jsx';
import UserStore from 'stores/user_store.jsx';
import WebrtcStore from 'stores/webrtc_store.jsx';
import Constants from 'utils/constants.jsx';
import DelayedAction from 'utils/delayed_action.jsx';
import * as Utils from 'utils/utils.jsx';
......@@ -55,7 +54,6 @@ export default class RhsThread extends React.Component {
channel: PropTypes.object.isRequired,
selected: PropTypes.object.isRequired,
previousRhsState: PropTypes.string,
isWebrtc: PropTypes.bool,
currentUser: PropTypes.object.isRequired,
previewCollapsed: PropTypes.string.isRequired,
previewEnabled: PropTypes.bool.isRequired,
......@@ -79,7 +77,6 @@ export default class RhsThread extends React.Component {
flaggedPosts: PreferenceStore.getCategory(Constants.Preferences.CATEGORY_FLAGGED_POST),
statuses: Object.assign({}, UserStore.getStatuses()),
previewsCollapsed: PreferenceStore.get(Preferences.CATEGORY_DISPLAY_SETTINGS, Preferences.COLLAPSE_DISPLAY, 'false'),
isBusy: WebrtcStore.isBusy(),
isScrolling: false,
topRhsPostCreateAt: 0,
openTime,
......@@ -90,7 +87,6 @@ export default class RhsThread extends React.Component {
PreferenceStore.addChangeListener(this.onPreferenceChange);
UserStore.addChangeListener(this.onUserChange);
UserStore.addStatusesChangeListener(this.onStatusChange);
WebrtcStore.addBusyListener(this.onBusy);
this.scrollToBottom();
window.addEventListener('resize', this.handleResize);
......@@ -100,7 +96,6 @@ export default class RhsThread extends React.Component {
PreferenceStore.removeChangeListener(this.onPreferenceChange);
UserStore.removeChangeListener(this.onUserChange);
UserStore.removeStatusesChangeListener(this.onStatusChange);
WebrtcStore.removeBusyListener(this.onBusy);
window.removeEventListener('resize', this.handleResize);
}
......@@ -432,7 +427,6 @@ export default class RhsThread extends React.Component {
/>
<RhsHeaderPost
previousRhsState={this.props.previousRhsState}
isWebrtc={this.props.isWebrtc}
/>
<Scrollbars
autoHide={true}
......
......@@ -3,7 +3,7 @@
import {connect} from 'react-redux';
import {getConfig, getLicense} from 'mattermost-redux/selectors/entities/general';
import {getMyTeams} from 'mattermost-redux/selectors/entities/teams';
import {getMyTeams, getJoinableTeamIds} from 'mattermost-redux/selectors/entities/teams';
import {haveITeamPermission, haveISystemPermission} from 'mattermost-redux/selectors/entities/roles';
import {Permissions} from 'mattermost-redux/constants';
......@@ -40,6 +40,9 @@ function mapStateToProps(state) {
}
}
const joinableTeams = getJoinableTeamIds(state);
const moreTeamsToJoin = joinableTeams && joinableTeams.length > 0;
return {
isLicensed,
appDownloadLink,
......@@ -58,6 +61,7 @@ function mapStateToProps(state) {
restrictTeamInvite,
pluginMenuItems: state.plugins.components.MainMenu,
canCreateCustomEmoji,
moreTeamsToJoin,
};
}
......
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import $ from 'jquery';
import PropTypes from 'prop-types';
import React from 'react';
import {Dropdown} from 'react-bootstrap';
import ReactDOM from 'react-dom';
import {FormattedMessage} from 'react-intl';
import {Link} from 'react-router-dom';
import {Permissions} from 'mattermost-redux/constants';
import * as GlobalActions from 'actions/global_actions.jsx';
import TeamStore from 'stores/team_store.jsx';
import WebrtcStore from 'stores/webrtc_store.jsx';
import {Constants, WebrtcActionTypes} from 'utils/constants.jsx';
import {Constants} from 'utils/constants.jsx';
import {useSafeUrl} from 'utils/url';
import * as UserAgent from 'utils/user_agent.jsx';
import AboutBuildModal from 'components/about_build_modal';
......@@ -30,11 +26,10 @@ import LeaveTeamModal from 'components/leave_team_modal';
import {ModalIdentifiers} from 'utils/constants';
import ToggleModalButtonRedux from 'components/toggle_modal_button_redux';
export default class SidebarHeaderDropdown extends React.Component {
export default class SidebarHeaderDropdown extends React.PureComponent {
static propTypes = {
teamId: PropTypes.string,
teamType: PropTypes.string,
teamDisplayName: PropTypes.string,
teamName: PropTypes.string,
currentUser: PropTypes.object,
appDownloadLink: PropTypes.string,
......@@ -43,17 +38,15 @@ export default class SidebarHeaderDropdown extends React.Component {
canCreateCustomEmoji: PropTypes.bool.isRequired,
enableIncomingWebhooks: PropTypes.bool.isRequired,
enableOAuthServiceProvider: PropTypes.bool.isRequired,
enableOnlyAdminIntegrations: PropTypes.bool.isRequired,
enableOutgoingWebhooks: PropTypes.bool.isRequired,
enableTeamCreation: PropTypes.bool.isRequired,
enableUserCreation: PropTypes.bool.isRequired,
enableEmailInvitations: PropTypes.bool.isRequired,
experimentalPrimaryTeam: PropTypes.string,
helpLink: PropTypes.string,
reportAProblemLink: PropTypes.string,
restrictTeamInvite: PropTypes.string,
showDropdown: PropTypes.bool.isRequired,
onToggleDropdown: PropTypes.func.isRequired,
moreTeamsToJoin: PropTypes.bool.isRequired,
pluginMenuItems: PropTypes.arrayOf(PropTypes.object),
};
......@@ -76,15 +69,9 @@ export default class SidebarHeaderDropdown extends React.Component {
this.hideTeamMembersModal = this.hideTeamMembersModal.bind(this);
this.toggleShortcutsModal = this.toggleShortcutsModal.bind(this);
this.onTeamChange = this.onTeamChange.bind(this);
this.renderCustomEmojiLink = this.renderCustomEmojiLink.bind(this);
this.handleClick = this.handleClick.bind(this);
this.state = {
teamMembers: TeamStore.getMyTeamMembers(),
teamListings: TeamStore.getTeamListings(),
showAboutModal: false,
showTeamSettingsModal: false,
showTeamMembersModal: false,
......@@ -92,13 +79,6 @@ export default class SidebarHeaderDropdown extends React.Component {
};
}
handleClick(e) {
if (WebrtcStore.isBusy()) {
WebrtcStore.emitChanged({action: WebrtcActionTypes.IN_PROGRESS});
e.preventDefault();
}
}
toggleDropdown = (val) => {
if (typeof (val) === 'boolean') {
this.props.onToggleDropdown(val);
......@@ -200,22 +180,6 @@ export default class SidebarHeaderDropdown extends React.Component {
});
}
componentDidMount() {
TeamStore.addChangeListener(this.onTeamChange);
}
onTeamChange() {
this.setState({
teamMembers: TeamStore.getMyTeamMembers(),
teamListings: TeamStore.getTeamListings(),
});
}
componentWillUnmount() {
$(ReactDOM.findDOMNode(this.refs.dropdown)).off('hide.bs.dropdown');
TeamStore.removeChangeListener(this.onTeamChange);
}
renderCustomEmojiLink() {
if (!this.props.enableCustomEmoji || !this.props.canCreateCustomEmoji) {
return null;
......@@ -225,7 +189,6 @@ export default class SidebarHeaderDropdown extends React.Component {
<li>
<Link
id='customEmoji'
onClick={this.handleClick}
to={'/' + this.props.teamName + '/emoji'}
>
<FormattedMessage
......@@ -395,7 +358,6 @@ export default class SidebarHeaderDropdown extends React.Component {
<Link
id='Integrations'
to={'/' + this.props.teamName + '/integrations'}
onClick={this.handleClick}
>
<FormattedMessage
id='navbar_dropdown.integrations'
......@@ -413,7 +375,6 @@ export default class SidebarHeaderDropdown extends React.Component {
<Link
id='systemConsole'
to={'/admin_console'}
onClick={this.handleClick}
>
<FormattedMessage
id='navbar_dropdown.console'
......@@ -425,7 +386,6 @@ export default class SidebarHeaderDropdown extends React.Component {
);
const teams = [];
let moreTeams = false;
teams.push(
<SystemPermissionGate
......@@ -437,7 +397,6 @@ export default class SidebarHeaderDropdown extends React.Component {
id='createTeam'
key='newTeam_a'
to='/create_team'
onClick={this.handleClick}
>
<FormattedMessage
id='navbar_dropdown.create'
......@@ -449,24 +408,11 @@ export default class SidebarHeaderDropdown extends React.Component {
);
if (!this.props.experimentalPrimaryTeam) {
const isAlreadyMember = this.state.teamMembers.reduce((result, item) => {
result[item.team_id] = true;
return result;
}, {});
for (const id in this.state.teamListings) {
if (this.state.teamListings.hasOwnProperty(id) && !isAlreadyMember[id]) {
moreTeams = true;
break;
}
}
if (moreTeams) {
if (this.props.moreTeamsToJoin) {
teams.push(
<li key='joinTeam_li'>
<Link
id='joinAnotherTeam'
onClick={this.handleClick}
to='/select_team'
>
<FormattedMessage
......
......@@ -3,16 +3,23 @@
import {connect} from 'react-redux';
import {getConfig} from 'mattermost-redux/selectors/entities/general';
import {getInt} from 'mattermost-redux/selectors/entities/preferences';
import {Preferences, TutorialSteps} from 'utils/constants.jsx';
import * as Utils from 'utils/utils.jsx';
import SidebarHeader from './sidebar_header.jsx';
function mapStateToProps(state) {
function mapStateToProps(state, ownProps) {
const config = getConfig(state);
const enableTutorial = config.EnableTutorial === 'true';
const showTutorialTip = getInt(state, Preferences.TUTORIAL_STEP, ownProps.currentUser.id) === TutorialSteps.MENU_POPOVER && !Utils.isMobile();
return {
enableTutorial,
showTutorialTip,
};
}
......
......@@ -5,28 +5,37 @@ import PropTypes from 'prop-types';
import React from 'react';
import {OverlayTrigger, Tooltip} from 'react-bootstrap';
import PreferenceStore from 'stores/preference_store.jsx';
import {Constants, Preferences, TutorialSteps} from 'utils/constants.jsx';
import {Constants} from 'utils/constants.jsx';
import * as Utils from 'utils/utils.jsx';
import StatusDropdown from 'components/status_dropdown/index.jsx';
import MenuTutorialTip from 'components/tutorial/menu_tutorial_tip';
import SidebarHeaderDropdown from './dropdown';
export default class SidebarHeader extends React.Component {
export default class SidebarHeader extends React.PureComponent {
static propTypes = {
teamId: PropTypes.string.isRequired,
teamDisplayName: PropTypes.string.isRequired,
teamDescription: PropTypes.string.isRequired,
teamName: PropTypes.string.isRequired,
teamType: PropTypes.string.isRequired,
currentUser: PropTypes.object.isRequired,
showTutorialTip: PropTypes.bool.isRequired,
};
constructor(props) {
super(props);
this.state = this.getStateFromStores();
this.state = {
isMobile: Utils.isMobile(),
showDropdown: false,
};
}
componentDidMount() {
PreferenceStore.addChangeListener(this.onPreferenceChange);
window.addEventListener('resize', this.handleResize);
}
componentWillUnmount() {
PreferenceStore.removeChangeListener(this.onPreferenceChange);
window.removeEventListener('resize', this.handleResize);
}
......@@ -35,30 +44,6 @@ export default class SidebarHeader extends React.Component {
this.setState({isMobile});
}
getPreferences = () => {
if (!this.props.currentUser) {
return {};
}
const tutorialStep = PreferenceStore.getInt(Preferences.TUTORIAL_STEP, this.props.currentUser.id, TutorialSteps.FINISHED);
const showTutorialTip = tutorialStep === TutorialSteps.MENU_POPOVER && !Utils.isMobile() && this.props.enableTutorial;
return {showTutorialTip};
}
getStateFromStores = () => {
const preferences = this.getPreferences();
const isMobile = Utils.isMobile();
return {
...preferences,
isMobile,
showDropdown: false,
};
}
onPreferenceChange = () => {
this.setState(this.getPreferences());
}
toggleDropdown = (toggle) => {
if (typeof (toggle) === 'boolean') {
this.setState({
......@@ -88,7 +73,7 @@ export default class SidebarHeader extends React.Component {
const statusDropdown = this.renderStatusDropdown();
let tutorialTip = null;
if (this.state.showTutorialTip) {
if (this.props.showTutorialTip) {
tutorialTip = (
<MenuTutorialTip
toggleFunc={this.showDropdown}
......@@ -160,19 +145,3 @@ export default class SidebarHeader extends React.Component {
);
}
}
SidebarHeader.propTypes = {
teamId: PropTypes.string,
teamDisplayName: PropTypes.string,
teamDescription: PropTypes.string,
teamName: PropTypes.string,
teamType: PropTypes.string,
currentUser: PropTypes.object,
enableTutorial: PropTypes.bool.isRequired,
};
SidebarHeader.defaultProps = {
teamDisplayName: '',
teamDescription: '',
teamType: '',
};
......@@ -7,8 +7,6 @@ import classNames from 'classnames';
import {trackEvent} from 'actions/diagnostics_actions.jsx';
import {postListScrollChange} from 'actions/global_actions.jsx';
import PostStore from 'stores/post_store.jsx';
import WebrtcStore from 'stores/webrtc_store.jsx';
import Constants from 'utils/constants.jsx';
import * as Utils from 'utils/utils.jsx';
import FileUploadOverlay from 'components/file_upload_overlay.jsx';
......@@ -16,7 +14,7 @@ import RhsThread from 'components/rhs_thread';
import SearchBar from 'components/search_bar';
import SearchResults from 'components/search_results';
export default class SidebarRight extends React.Component {
export default class SidebarRight extends React.PureComponent {
static propTypes = {
isExpanded: PropTypes.bool.isRequired,
isOpen: PropTypes.bool.isRequired,
......@@ -36,51 +34,16 @@ export default class SidebarRight extends React.Component {
}),
};
constructor(props) {
super(props);
this.plScrolledToBottom = true;
}
componentDidMount() {
PostStore.addPostPinnedChangeListener(this.onPostPinnedChange);
}
componentWillUnmount() {
PostStore.removePostPinnedChangeListener(this.onPostPinnedChange);
}
UNSAFE_componentWillReceiveProps(nextProps) { // eslint-disable-line camelcase
const isOpen = this.props.searchVisible || this.props.postRightVisible;
const willOpen = nextProps.searchVisible || nextProps.postRightVisible;
if (!isOpen && willOpen) {
trackEvent('ui', 'ui_rhs_opened');
}
if (nextProps.isPinnedPosts && nextProps.channel &&
this.props.isPinnedPosts === nextProps.isPinnedPosts &&
this.props.channel !== nextProps.channel) {
this.props.actions.showPinnedPosts(nextProps.channel.id);
}
}
componentDidUpdate(prevProps) {
const isOpen = this.props.searchVisible || this.props.postRightVisible;
const wasOpen = prevProps.searchVisible || prevProps.postRightVisible;
const isOpen = this.props.searchVisible || this.props.postRightVisible;
if (isOpen && !wasOpen) {
if (!wasOpen && isOpen) {
trackEvent('ui', 'ui_rhs_opened');
setTimeout(postListScrollChange, 0);
}
}
onPostPinnedChange = () => {
if (this.props.channel && this.props.isPinnedPosts) {
this.props.actions.getPinnedPosts(this.props.channel.id);
}
};
onShrink = () => {
this.props.actions.setRhsExpanded(false);
};
......@@ -139,7 +102,6 @@ export default class SidebarRight extends React.Component {
<div className='search-bar__container channel-header alt'>{searchForm}</div>
<RhsThread
previousRhsState={previousRhsState}
isWebrtc={WebrtcStore.isBusy()}
currentUser={currentUser}
toggleSize={this.toggleSize}
shrink={this.onShrink}
......
......@@ -5,7 +5,7 @@ import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import {getConfig, getLicense} from 'mattermost-redux/selectors/entities/general';
import {getCurrentUserId} from 'mattermost-redux/selectors/entities/users';
import {getCurrentTeamId} from 'mattermost-redux/selectors/entities/teams';
import {getCurrentTeamId, getJoinableTeamIds} from 'mattermost-redux/selectors/entities/teams';
import {getInt} from 'mattermost-redux/selectors/entities/preferences';
import {showMentions, showFlaggedPosts, closeRightHandSide, openMenu as openRhsMenu, closeMenu as closeRhsMenu} from 'actions/views/rhs';
......@@ -33,8 +33,12 @@ function mapStateToProps(state) {
const restrictTeamInvite = config.RestrictTeamInvite;
const siteName = config.SiteName;
const joinableTeams = getJoinableTeamIds(state);
const moreTeamsToJoin = joinableTeams && joinableTeams.length > 0;
return {
teamId: getCurrentTeamId(state),
currentUserId: getCurrentUserId(state),
isOpen: getIsRhsMenuOpen(state),
isMentionSearch: rhsState === RHSStates.MENTION,
showTutorialTip: enableTutorial && isMobile() && tutorialStep === TutorialSteps.MENU_POPOVER,
......@@ -47,6 +51,7 @@ function mapStateToProps(state) {
reportAProblemLink,
restrictTeamInvite,
siteName,
moreTeamsToJoin,
pluginMenuItems: state.plugins.components.MainMenu,
};
}
......
......@@ -9,13 +9,8 @@ import {Permissions} from 'mattermost-redux/constants';
import classNames from 'classnames';
import * as GlobalActions from 'actions/global_actions.jsx';
import PreferenceStore from 'stores/preference_store.jsx';
import TeamStore from 'stores/team_store.jsx';
import UserStore from 'stores/user_store.jsx';
import WebrtcStore from 'stores/webrtc_store.jsx';
import {
Constants,
WebrtcActionTypes,
} from 'utils/constants.jsx';
import {useSafeUrl} from 'utils/url.jsx';
import * as UserAgent from 'utils/user_agent.jsx';
......@@ -33,9 +28,10 @@ import ToggleModalButtonRedux from 'components/toggle_modal_button_redux';
import LeaveTeamModal from 'components/leave_team_modal';
import {ModalIdentifiers} from 'utils/constants';
export default class SidebarRightMenu extends React.Component {
export default class SidebarRightMenu extends React.PureComponent {
static propTypes = {
teamId: PropTypes.string,
currentUserId: PropTypes.string.isRequired,
isOpen: PropTypes.bool.isRequired,
teamType: PropTypes.string,
teamDisplayName: PropTypes.string,
......@@ -47,6 +43,7 @@ export default class SidebarRightMenu extends React.Component {
helpLink: PropTypes.string,
reportAProblemLink: PropTypes.string,
siteName: PropTypes.string,
moreTeamsToJoin: PropTypes.bool.isRequired,
pluginMenuItems: PropTypes.arrayOf(PropTypes.object),
actions: PropTypes.shape({
showMentions: PropTypes.func,
......@@ -65,30 +62,12 @@ export default class SidebarRightMenu extends React.Component {
super(props);
this.state = {
...this.getStateFromStores(),
showAboutModal: false,
showAddUsersToTeamModal: false,
showTeamSettingsModal: false,
};
}
componentDidMount() {
TeamStore.addChangeListener(this.onChange);
PreferenceStore.addChangeListener(this.onChange);
}
componentWillUnmount() {
TeamStore.removeChangeListener(this.onChange);
PreferenceStore.removeChangeListener(this.onChange);
}
handleClick = (e) => {
if (WebrtcStore.isBusy()) {
WebrtcStore.emitChanged({action: WebrtcActionTypes.IN_PROGRESS});
e.preventDefault();
}
}
handleAboutModal = () => {
this.setState({showAboutModal: true});
}
......@@ -131,18 +110,6 @@ export default class SidebarRightMenu extends React.Component {
this.props.actions.closeRhsMenu();
}
getStateFromStores = () => {
return {
currentUser: UserStore.getCurrentUser(),
teamMembers: TeamStore.getMyTeamMembers(),
teamListings: TeamStore.getTeamListings(),
};
}
onChange = () => {
this.setState(this.getStateFromStores());
}
searchMentions = (e) => {
e.preventDefault();
......@@ -163,7 +130,6 @@ export default class SidebarRightMenu extends React.Component {
}
render() {
const currentUser = UserStore.getCurrentUser();
let teamLink;
let inviteLink;
let addUserToTeamLink;
......@@ -172,7 +138,7 @@ export default class SidebarRightMenu extends React.Component {
let joinAnotherTeamLink;
let createTeam = null;
if (currentUser != null) {
if (this.props.currentUserId != null) {
inviteLink = (
<TeamPermissionGate
teamId={this.props.teamId}
......@@ -246,20 +212,7 @@ export default class SidebarRightMenu extends React.Component {
);
}
let moreTeams = false;
const isAlreadyMember = this.state.teamMembers.reduce((result, item) => {
result[item.team_id] = true;
return result;
}, {});
for (const id in this.state.teamListings) {
if (this.state.teamListings.hasOwnProperty(id) && !isAlreadyMember[id]) {
moreTeams = true;
break;
}
}
if (moreTeams && !this.props.experimentalPrimaryTeam) {
if (this.props.moreTeamsToJoin && !this.props.experimentalPrimaryTeam) {
joinAnotherTeamLink = (
<li key='joinTeam_li'>
<Link to='/select_team'>
......
......@@ -51,7 +51,6 @@ export default class TeamButton extends React.Component {
}
}
let btn;
let content = this.props.content;
if (!content) {
......@@ -78,33 +77,24 @@ export default class TeamButton extends React.Component {
}
}
if (this.props.isMobile) {
btn = (
const toolTip = this.props.tip || localizeMessage('team.button.name_undefined', 'Name undefined');
const btn = (
<OverlayTrigger
trigger={['hover', 'focus']}
delayShow={Constants.OVERLAY_TIME_DELAY}
placement={this.props.placement}
overlay={
<Tooltip id={`tooltip-${this.props.url}`}>
{toolTip}
</Tooltip>
}
>
<div className={'team-btn ' + btnClass}>
{badge}
{content}
</div>
);
} else {
const toolTip = this.props.tip || localizeMessage('team.button.name_undefined', 'Name undefined');
btn = (
<OverlayTrigger
trigger={['hover', 'focus']}
delayShow={Constants.OVERLAY_TIME_DELAY}
placement={this.props.placement}
overlay={
<Tooltip id={`tooltip-${this.props.url}`}>
{toolTip}
</Tooltip>
}
>
<div className={'team-btn ' + btnClass}>
{badge}
{content}
</div>
</OverlayTrigger>
);
}
</OverlayTrigger>
);
let teamButton;
if (isDesktopApp()) {
......@@ -168,7 +158,6 @@ TeamButton.propTypes = {
tip: PropTypes.node.isRequired,
active: PropTypes.bool,
disabled: PropTypes.bool,
isMobile: PropTypes.bool,
unread: PropTypes.bool,
mentions: PropTypes.number,
placement: PropTypes.oneOf(['left', 'right', 'top', 'bottom']),
......
......@@ -4,6 +4,7 @@
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import {getTeams} from 'mattermost-redux/actions/teams';
import {getMyTeams, getJoinableTeamIds, getTeamMemberships, getCurrentTeamId} from 'mattermost-redux/selectors/entities/teams';
import {withRouter} from 'react-router-dom';
import {getConfig} from 'mattermost-redux/selectors/entities/general';
......@@ -16,11 +17,17 @@ function mapStateToProps(state) {