import React from 'react'; import { observer } 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'; @observer(['user']) 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() { 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. ) } ); } }
We're building a modern wiki for engineering teams.