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

View File

@ -1,12 +1,10 @@
import React from 'react' import React from 'react'
import _ from 'lodash' import _ from 'lodash'
import { useUser } from '../hooks/use-user'
import { import {
Contract, Contract,
getHotContracts, getHotContracts,
listAllContracts, listAllContracts,
} from '../lib/firebase/contracts' } from '../lib/firebase/contracts'
import LandingPage from './landing-page'
import { ContractsGrid } from '../components/contracts-list' import { ContractsGrid } from '../components/contracts-list'
import { Spacer } from '../components/layout/spacer' import { Spacer } from '../components/layout/spacer'
import { Page } from '../components/page' import { Page } from '../components/page'
@ -37,16 +35,8 @@ const Home = (props: {
hotContracts: Contract[] hotContracts: Contract[]
recentComments: Comment[] recentComments: Comment[]
}) => { }) => {
const user = useUser()
if (user === undefined) return <></>
const { contracts, hotContracts, recentComments } = props const { contracts, hotContracts, recentComments } = props
if (user === null) {
return <LandingPage hotContracts={hotContracts} />
}
return ( return (
<Page> <Page>
<div className="w-full bg-indigo-50 border-2 border-indigo-100 p-6 rounded-lg shadow-md"> <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() { function Hero() {
return ( return (
<div className="overflow-hidden h-screen bg-world-trading bg-cover bg-gray-900 bg-center lg:bg-left"> <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> <main>
<div className="pt-32 sm:pt-8 lg:pt-0 lg:pb-14 lg:overflow-hidden"> <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"> <div className="mx-auto max-w-7xl lg:px-8 xl:px-0">