// @flow import React from 'react'; import { observer, inject } from 'mobx-react'; import { browserHistory } from 'react-router'; import { Flex } from 'reflexbox'; import Layout from 'components/Layout'; import CenteredContent from 'components/CenteredContent'; import SlackAuthLink from 'components/SlackAuthLink'; import Alert from 'components/Alert'; import styles from './Home.scss'; @inject('user') @observer export default class Home extends React.Component { static propTypes = { user: React.PropTypes.object.isRequired, location: React.PropTypes.object.isRequired, }; componentDidMount = () => { if (this.props.user.authenticated) { browserHistory.replace('/dashboard'); } }; get notifications(): React.Element[] { const notifications = []; const { state } = this.props.location; if (state && state.nextPathname) { sessionStorage.removeItem('redirectTo'); sessionStorage.setItem('redirectTo', state.nextPathname); notifications.push( Please login to continue ); } return notifications; } render() { const showLandingPageCopy = DEPLOYMENT === 'hosted'; return ( {showLandingPageCopy &&

Simple, fast, markdown.

We're building a modern wiki for engineering teams.

}
Sign in with Slack
); } }