summaryrefslogtreecommitdiffstats
path: root/webapp/components/quick_switch_modal/index.js
blob: 7826fd8f514b59d7fd353a2336b76da8ccbfb8e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Copyright (c) 2017 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.

import {connect} from 'react-redux';
import {getMyTeams} from 'mattermost-redux/selectors/entities/teams';

import QuickSwitchModal from './quick_switch_modal.jsx';

function mapStateToProps(state, ownProps) {
    return {
        ...ownProps,
        showTeamSwitcher: getMyTeams(state).length > 1
    };
}

export default connect(mapStateToProps)(QuickSwitchModal);