diff options
Diffstat (limited to 'webapp/components/quick_switch_modal/index.js')
-rw-r--r-- | webapp/components/quick_switch_modal/index.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/webapp/components/quick_switch_modal/index.js b/webapp/components/quick_switch_modal/index.js new file mode 100644 index 000000000..7826fd8f5 --- /dev/null +++ b/webapp/components/quick_switch_modal/index.js @@ -0,0 +1,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); |