You've already forked mattermost-webapp
mirror of
https://github.com/zerotier/mattermost-webapp.git
synced 2026-05-22 16:23:25 -07:00
19069b5ee7
* Easy dependancies upgrade. * Redux upgrade to 4 * React codemod to change to UNSAFE * Upgrade eslint. * Being more specific with disabled lines. * Fixing tests. * Downgrading image-webpack-loader because latest is broken.
66 lines
2.2 KiB
React
66 lines
2.2 KiB
React
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import React from 'react';
|
|
import ReactDOM from 'react-dom';
|
|
import {Switch, Route} from 'react-router-dom';
|
|
import PropTypes from 'prop-types';
|
|
|
|
import Messaging from './components/messaging';
|
|
import Composing from './components/composing';
|
|
import Mentioning from './components/mentioning';
|
|
import Formatting from './components/formatting';
|
|
import Attaching from './components/attaching';
|
|
import Commands from './components/commands';
|
|
|
|
export default class HelpController extends React.Component {
|
|
UNSAFE_componentWillUpdate() { // eslint-disable-line camelcase
|
|
ReactDOM.findDOMNode(this).scrollIntoView();
|
|
}
|
|
|
|
render() {
|
|
return (
|
|
<div className='help-page'>
|
|
<div className='container col-sm-10 col-sm-offset-1'>
|
|
<Switch>
|
|
<Route
|
|
path={`${this.props.match.url}/messaging`}
|
|
component={Messaging}
|
|
/>
|
|
<Route
|
|
path={`${this.props.match.url}/composing`}
|
|
component={Composing}
|
|
/>
|
|
<Route
|
|
path={`${this.props.match.url}/mentioning`}
|
|
component={Mentioning}
|
|
/>
|
|
<Route
|
|
path={`${this.props.match.url}/formatting`}
|
|
component={Formatting}
|
|
/>
|
|
<Route
|
|
path={`${this.props.match.url}/attaching`}
|
|
component={Attaching}
|
|
/>
|
|
<Route
|
|
path={`${this.props.match.url}/commands`}
|
|
component={Commands}
|
|
/>
|
|
</Switch>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
}
|
|
|
|
HelpController.propTypes = {
|
|
|
|
/*
|
|
* Object from react-router
|
|
*/
|
|
match: PropTypes.shape({
|
|
url: PropTypes.string.isRequired,
|
|
}).isRequired,
|
|
};
|