summaryrefslogtreecommitdiffstats
path: root/webapp/components/tutorial/tutorial_view.jsx
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2016-04-01 12:04:40 -0400
committerChristopher Speller <crspeller@gmail.com>2016-04-01 12:04:40 -0400
commit9241f799dd59db14dd06b0536db9cb820b1b60db (patch)
tree93b07af94b7a3e086f6921b87688736bc9979d6e /webapp/components/tutorial/tutorial_view.jsx
parent763bfc780ae7dbdda78a0e40295d30844536abe3 (diff)
parent494d09a81eddec88ad48c7067d0b47a41cf7ed8b (diff)
downloadchat-9241f799dd59db14dd06b0536db9cb820b1b60db.tar.gz
chat-9241f799dd59db14dd06b0536db9cb820b1b60db.tar.bz2
chat-9241f799dd59db14dd06b0536db9cb820b1b60db.zip
Merge pull request #2609 from mattermost/plt-2311
PLT-2311 Update tutorial channel names to reflect actual display names
Diffstat (limited to 'webapp/components/tutorial/tutorial_view.jsx')
-rw-r--r--webapp/components/tutorial/tutorial_view.jsx31
1 files changed, 28 insertions, 3 deletions
diff --git a/webapp/components/tutorial/tutorial_view.jsx b/webapp/components/tutorial/tutorial_view.jsx
index d9e0ef40d..5f2c1a257 100644
--- a/webapp/components/tutorial/tutorial_view.jsx
+++ b/webapp/components/tutorial/tutorial_view.jsx
@@ -1,18 +1,43 @@
// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
-import React from 'react';
-
import TutorialIntroScreens from './tutorial_intro_screens.jsx';
+import ChannelStore from 'stores/channel_store.jsx';
+import Constants from 'utils/constants.jsx';
+
+import React from 'react';
+
export default class TutorialView extends React.Component {
+ constructor(props) {
+ super(props);
+
+ this.handleChannelChange = this.handleChannelChange.bind(this);
+
+ this.state = {
+ townSquare: ChannelStore.getByName(Constants.DEFAULT_CHANNEL)
+ };
+ }
+ componentDidMount() {
+ ChannelStore.addChangeListener(this.handleChannelChange);
+ }
+ componentWillUnmount() {
+ ChannelStore.removeChangeListener(this.handleChannelChange);
+ }
+ handleChannelChange() {
+ this.setState({
+ townSquare: ChannelStore.getByName(Constants.DEFAULT_CHANNEL)
+ });
+ }
render() {
return (
<div
id='app-content'
className='app__content'
>
- <TutorialIntroScreens/>
+ <TutorialIntroScreens
+ townSquare={this.state.townSquare}
+ />
</div>
);
}