Farmbot-Web-App/frontend/help/help.tsx

31 lines
843 B
TypeScript
Raw Permalink Normal View History

2018-10-15 17:23:58 -06:00
import * as React from "react";
import { connect } from "react-redux";
2019-01-09 19:28:37 -07:00
import { Page, Col } from "../ui";
import { Actions } from "../constants";
2018-10-15 17:23:58 -06:00
import { Everything } from "../interfaces";
2019-01-09 19:28:37 -07:00
import { DocsWidget } from "./docs";
import { ToursWidget } from "./tour_list";
2018-10-15 17:23:58 -06:00
export function mapStateToProps(props: Everything): { dispatch: Function } {
const { dispatch } = props;
return { dispatch };
}
2019-09-19 13:09:00 -06:00
export class RawHelp extends React.Component<{ dispatch: Function }, {}> {
2018-10-15 17:23:58 -06:00
componentDidMount() {
this.props.dispatch({ type: Actions.START_TOUR, payload: undefined });
}
render() {
return <Page className="help-page">
<Col xs={12} sm={6} smOffset={3}>
2019-01-09 19:28:37 -07:00
<ToursWidget dispatch={this.props.dispatch} />
<DocsWidget />
2018-10-15 17:23:58 -06:00
</Col>
</Page>;
}
}
2019-09-19 13:09:00 -06:00
export const Help = connect(mapStateToProps)(RawHelp);