Files
mattermost-webapp/components/tutorial/tutorial_view.jsx
T
Jesse Hallam 2e9baa6738 Remove mm_config and mm_license global state from webapp (PR #3) (#820)
* MM-8589: expunge global mm_config from navbar component

* MM-8589: expunge global mm_config from file_upload and related components

* MM-8589: expunge global mm_(config|license) from the tutorial component

* MM-8589: expunge global mm_config from channel view component

* MM-8589: expunge global mm_config from DoVerifyEmail component

* MM-8589: use the get(Config|License) selector

* MM-8589: expunge unnecessary ownProps
2018-02-16 06:00:29 -03:00

53 lines
1.4 KiB
React

// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
import $ from 'jquery';
import PropTypes from 'prop-types';
import React from 'react';
import TutorialIntroScreens from './tutorial_intro_screens.jsx';
export default class TutorialView extends React.Component {
componentDidMount() {
if (this.props.isRoot) {
$('body').addClass('app__body');
}
}
componentWillUnmount() {
if (this.props.isRoot) {
$('body').removeClass('app__body');
}
}
render() {
return (
<div
id='app-content'
className='app__content'
>
<TutorialIntroScreens
townSquareDisplayName={this.props.townSquareDisplayName}
appDownloadLink={this.props.appDownloadLink}
isLicensed={this.props.isLicensed}
restrictTeamInvite={this.props.restrictTeamInvite}
supportEmail={this.props.supportEmail}
/>
</div>
);
}
}
TutorialView.propTypes = {
isRoot: PropTypes.bool,
townSquareDisplayName: PropTypes.string.isRequired,
appDownloadLink: PropTypes.string,
isLicensed: PropTypes.bool.isRequired,
restrictTeamInvite: PropTypes.string.isRequired,
supportEmail: PropTypes.string.isRequired
};
TutorialView.defaultProps = {
isRoot: true
};