Axe landing page, show home feed

This commit is contained in:
jahooma 2022-01-13 14:54:31 -06:00
parent 2db69e4d15
commit 07a7fc219b
3 changed files with 13 additions and 26 deletions

View File

@ -10,11 +10,10 @@ import { ProfileMenu } from './profile-menu'
export function NavBar(props: {
darkBackground?: boolean
wide?: boolean
isLandingPage?: boolean
className?: string
children?: any
}) {
const { darkBackground, wide, isLandingPage, className, children } = props
const { darkBackground, wide, className, children } = props
const user = useUser()
@ -27,7 +26,7 @@ export function NavBar(props: {
<Row
className={clsx(
'justify-between items-center mx-auto sm:px-4',
isLandingPage ? 'max-w-7xl' : wide ? 'max-w-6xl' : 'max-w-4xl'
wide ? 'max-w-6xl' : 'max-w-4xl'
)}
>
<ManifoldLogo darkBackground={darkBackground} />
@ -48,18 +47,16 @@ export function NavBar(props: {
</Link>
)}
{!isLandingPage && (
<Link href="/markets">
<a
className={clsx(
'text-base hidden md:block whitespace-nowrap',
themeClasses
)}
>
All markets
</a>
</Link>
)}
<Link href="/markets">
<a
className={clsx(
'text-base hidden md:block whitespace-nowrap',
themeClasses
)}
>
All markets
</a>
</Link>
{user ? (
<SignedInHeaders user={user} themeClasses={themeClasses} />

View File

@ -1,12 +1,10 @@
import React from 'react'
import _ from 'lodash'
import { useUser } from '../hooks/use-user'
import {
Contract,
getHotContracts,
listAllContracts,
} from '../lib/firebase/contracts'
import LandingPage from './landing-page'
import { ContractsGrid } from '../components/contracts-list'
import { Spacer } from '../components/layout/spacer'
import { Page } from '../components/page'
@ -37,16 +35,8 @@ const Home = (props: {
hotContracts: Contract[]
recentComments: Comment[]
}) => {
const user = useUser()
if (user === undefined) return <></>
const { contracts, hotContracts, recentComments } = props
if (user === null) {
return <LandingPage hotContracts={hotContracts} />
}
return (
<Page>
<div className="w-full bg-indigo-50 border-2 border-indigo-100 p-6 rounded-lg shadow-md">

View File

@ -34,7 +34,7 @@ const scrollToAbout = () => {
function Hero() {
return (
<div className="overflow-hidden h-screen bg-world-trading bg-cover bg-gray-900 bg-center lg:bg-left">
<NavBar isLandingPage darkBackground />
<NavBar darkBackground />
<main>
<div className="pt-32 sm:pt-8 lg:pt-0 lg:pb-14 lg:overflow-hidden">
<div className="mx-auto max-w-7xl lg:px-8 xl:px-0">