diff --git a/web/components/header.tsx b/web/components/header.tsx index 575be5ed..ab33a75a 100644 --- a/web/components/header.tsx +++ b/web/components/header.tsx @@ -24,21 +24,10 @@ function SignInLink(props: { darkBackground?: boolean }) { ? 'text-white hover:text-gray-300' : 'hover:text-gray-500' - const [showLogin, setShowLogin] = useState(false) - useEffect(() => { - setShowLogin(location.search.includes('demo')) - }, []) - return ( <> {user ? ( <> - - - All markets - - - Create a market @@ -51,15 +40,21 @@ function SignInLink(props: { darkBackground?: boolean }) { - ) : showLogin ? ( - ) : ( - <> + <> + + + All markets + + + + + )} ) diff --git a/web/pages/index.tsx b/web/pages/index.tsx index 2bde6f17..7485a397 100644 --- a/web/pages/index.tsx +++ b/web/pages/index.tsx @@ -3,9 +3,12 @@ import React from 'react' import type { NextPage } from 'next' import { Hero } from '../components/hero' +import { useUser } from '../hooks/use-user' +import Markets from './markets' const Home: NextPage = () => { - return + const user = useUser() + return user ? : } export default Home