From 1956cd0739e3ff9dfb8d3e6e1735768e390f8272 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Sun, 22 Oct 2017 20:43:02 -0700 Subject: [PATCH] Remove old homepage --- frontend/scenes/Home/Home.js | 70 +++--------------------------------- 1 file changed, 5 insertions(+), 65 deletions(-) diff --git a/frontend/scenes/Home/Home.js b/frontend/scenes/Home/Home.js index a65b665d0..37ef49dc0 100644 --- a/frontend/scenes/Home/Home.js +++ b/frontend/scenes/Home/Home.js @@ -2,76 +2,16 @@ 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; -}`; +const Home = observer((props: Props) => { + if (props.auth.authenticated) return ; + window.location.href = BASE_URL; + return null; +}); export default inject('auth')(Home);