mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
* PLT-5860 Updated copyright date in about modal * PLT-5860 Updated copyright notice in JSX files * PLT-5860 Updated copyright notice in go files * Fixed misc copyright dates * Fixed component snapshots
50 lines
1.3 KiB
JavaScript
50 lines
1.3 KiB
JavaScript
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
|
|
// See License.txt for license information.
|
|
|
|
import TutorialIntroScreens from './tutorial_intro_screens.jsx';
|
|
|
|
import ChannelStore from 'stores/channel_store.jsx';
|
|
import Constants from 'utils/constants.jsx';
|
|
|
|
import $ from 'jquery';
|
|
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);
|
|
|
|
$('body').addClass('app__body');
|
|
}
|
|
componentWillUnmount() {
|
|
ChannelStore.removeChangeListener(this.handleChannelChange);
|
|
|
|
$('body').removeClass('app__body');
|
|
}
|
|
handleChannelChange() {
|
|
this.setState({
|
|
townSquare: ChannelStore.getByName(Constants.DEFAULT_CHANNEL)
|
|
});
|
|
}
|
|
render() {
|
|
return (
|
|
<div
|
|
id='app-content'
|
|
className='app__content'
|
|
>
|
|
<TutorialIntroScreens
|
|
townSquare={this.state.townSquare}
|
|
/>
|
|
</div>
|
|
);
|
|
}
|
|
}
|