summaryrefslogtreecommitdiffstats
path: root/webapp/components/quick_switch_modal/index.js
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-05-31 16:51:42 -0400
committerGitHub <noreply@github.com>2017-05-31 16:51:42 -0400
commit5aaedb9663b987caf1fb11ea6062bcc44e6bafca (patch)
treebd77c10168f9fb1b0f998b08a3b2a3761512a451 /webapp/components/quick_switch_modal/index.js
parent8ce72aedc3a5b4f783fb6ebab38aac8bf5f413ae (diff)
downloadchat-5aaedb9663b987caf1fb11ea6062bcc44e6bafca.tar.gz
chat-5aaedb9663b987caf1fb11ea6062bcc44e6bafca.tar.bz2
chat-5aaedb9663b987caf1fb11ea6062bcc44e6bafca.zip
PLT-5699 Improvements to channel switcher (#6486)
* Refactor channel switcher to not wait on server results * Change channel switcher to quick switcher and include team switching * Add sections, update ordering and add discoverability button * Fix styling error * Use CMD in text if on mac * Clean yarn cache on every install * Various UX updates per feedback * Add shortcut help text for team switcher * Couple more updates per feedback * Some minor fixes for GM and autocomplete race * Updating UI for channel switcher (#6504) * Updating channel switcher button (#6506) * Updating switcher modal on mobile (#6507) * Removed jQuery usage * Rename function to toggleQuickSwitchModal
Diffstat (limited to 'webapp/components/quick_switch_modal/index.js')
-rw-r--r--webapp/components/quick_switch_modal/index.js16
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);