summaryrefslogtreecommitdiffstats
path: root/web/react/components/more_channels.jsx
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2015-11-20 09:22:16 -0500
committerHarrison Healey <harrisonmhealey@gmail.com>2015-11-20 09:22:16 -0500
commit25bc02c785167370b0e2e04ee04f305a801078c4 (patch)
tree00a8e7c9821fc8d8669fd7a908b3f70e3089c95a /web/react/components/more_channels.jsx
parent3aea449b524f7bbc9bae92309fb702e04c1bf01e (diff)
parent34097faa13dab6ea5d7ac992842126c17ad4d2b9 (diff)
downloadchat-25bc02c785167370b0e2e04ee04f305a801078c4.tar.gz
chat-25bc02c785167370b0e2e04ee04f305a801078c4.tar.bz2
chat-25bc02c785167370b0e2e04ee04f305a801078c4.zip
Merge pull request #1478 from mattermost/plt-1237
PLT-1237 Upgrading dependancies
Diffstat (limited to 'web/react/components/more_channels.jsx')
-rw-r--r--web/react/components/more_channels.jsx28
1 files changed, 14 insertions, 14 deletions
diff --git a/web/react/components/more_channels.jsx b/web/react/components/more_channels.jsx
index 8a6dd84a4..29512b9b7 100644
--- a/web/react/components/more_channels.jsx
+++ b/web/react/components/more_channels.jsx
@@ -1,12 +1,12 @@
// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
-var utils = require('../utils/utils.jsx');
-var client = require('../utils/client.jsx');
-var asyncClient = require('../utils/async_client.jsx');
-var ChannelStore = require('../stores/channel_store.jsx');
-var LoadingScreen = require('./loading_screen.jsx');
-var NewChannelFlow = require('./new_channel_flow.jsx');
+import * as utils from '../utils/utils.jsx';
+import * as client from '../utils/client.jsx';
+import * as AsyncClient from '../utils/async_client.jsx';
+import ChannelStore from '../stores/channel_store.jsx';
+import LoadingScreen from './loading_screen.jsx';
+import NewChannelFlow from './new_channel_flow.jsx';
function getStateFromStores() {
return {
@@ -31,12 +31,12 @@ export default class MoreChannels extends React.Component {
}
componentDidMount() {
ChannelStore.addMoreChangeListener(this.onListenerChange);
- $(ReactDOM.findDOMNode(this.refs.modal)).on('shown.bs.modal', function shown() {
- asyncClient.getMoreChannels(true);
+ $(ReactDOM.findDOMNode(this.refs.modal)).on('shown.bs.modal', () => {
+ AsyncClient.getMoreChannels(true);
});
var self = this;
- $(ReactDOM.findDOMNode(this.refs.modal)).on('show.bs.modal', function show(e) {
+ $(ReactDOM.findDOMNode(this.refs.modal)).on('show.bs.modal', (e) => {
var button = e.relatedTarget;
self.setState({channelType: $(button).attr('data-channeltype')});
});
@@ -53,15 +53,15 @@ export default class MoreChannels extends React.Component {
handleJoin(channel, channelIndex) {
this.setState({joiningChannel: channelIndex});
client.joinChannel(channel.id,
- function joinSuccess() {
+ () => {
$(ReactDOM.findDOMNode(this.refs.modal)).modal('hide');
- asyncClient.getChannel(channel.id);
+ AsyncClient.getChannel(channel.id);
utils.switchChannel(channel);
this.setState({joiningChannel: -1});
- }.bind(this),
- function joinFail(err) {
+ },
+ (err) => {
this.setState({joiningChannel: -1, serverError: err.message});
- }.bind(this)
+ }
);
}
handleNewChannel() {