2021-12-03 01:18:00 +00:00
|
|
|
import React from 'react'
|
|
|
|
|
2021-12-02 23:49:46 +00:00
|
|
|
import type { NextPage } from 'next'
|
2021-12-03 01:18:00 +00:00
|
|
|
|
2021-12-02 23:49:46 +00:00
|
|
|
import { Hero } from '../components/hero'
|
2021-12-15 07:24:55 +00:00
|
|
|
import { useUser } from '../hooks/use-user'
|
|
|
|
import Markets from './markets'
|
2021-12-01 04:20:13 +00:00
|
|
|
|
|
|
|
const Home: NextPage = () => {
|
2021-12-15 07:24:55 +00:00
|
|
|
const user = useUser()
|
2021-12-17 03:37:36 +00:00
|
|
|
|
|
|
|
if (user === undefined) return <></>
|
2021-12-15 07:24:55 +00:00
|
|
|
return user ? <Markets /> : <Hero />
|
2021-12-02 23:49:46 +00:00
|
|
|
}
|
2021-12-01 04:20:13 +00:00
|
|
|
|
2021-12-02 23:49:46 +00:00
|
|
|
export default Home
|