// @flow import React from 'react'; import { observer, inject } from 'mobx-react'; import { Redirect } from 'react-router'; import Flex from 'components/Flex'; import styled from 'styled-components'; import AuthStore from 'stores/AuthStore'; import CenteredContent from 'components/CenteredContent'; import SlackAuthLink from 'components/SlackAuthLink'; import Alert from 'components/Alert'; type Props = { auth: AuthStore, location: Object, }; @observer class Home extends React.Component { props: Props; 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 ( {this.props.auth.authenticated && } {showLandingPageCopy &&
Simple, fast, markdown. We're building a modern wiki for engineering teams.
}
Sign in with Slack
); } } const Title = styled.h1` font-size: 36px; margin-bottom: 24px; }`; const Copy = styled.p` font-size: 20px; margin-bottom: 36px; }`; export default inject('auth')(Home);