Skip to content

Commit

Permalink
Removed landing as the default route - now dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
nzvorn committed Jul 25, 2021
1 parent ecf25e5 commit ec42f15
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion components/Header/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const Header = () => {
{notice && <Notice style={{ position: 'fixed', bottom: '0' }}><Icon type='warning' /> {notice}</Notice>}
<MenuGrid>
<div>
<Link href='/landing'>
<Link href='/'>
<LogoContainer>
<Logo
src='data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'
Expand Down
8 changes: 3 additions & 5 deletions pages/index.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
import Landing from './landing/landing'

import Home from './home/home'
import { getSession } from '../lib/auth/auth'

const RootPage = (props) => {
return (
<>
{props.isAuthenticated
? <Home {...props} />
: <Landing {...props} />}
<Home {...props} />
</>)
}

RootPage.getInitialProps = async (ctx) => {
const session = await getSession(ctx.req, ctx.store)
const page = session.isAuthenticated ? Home : Landing
const page = Home
if (page.getInitialProps) {
const pageProps = await page.getInitialProps(ctx)
return pageProps
Expand Down

0 comments on commit ec42f15

Please sign in to comment.