import { useEffect, useState } from 'react' import clsx from 'clsx' import Image from 'next/image' import Link from 'next/link' import { Popover } from '@headlessui/react' import { useUser } from '../hooks/use-user' import { firebaseLogin } from '../lib/firebase/users' const navigation = [ { name: 'About', href: 'https://mantic.notion.site/About-Mantic-Markets-7c44bc161356474cad54cba2d2973fe2', }, // { name: 'Simulator', href: '/simulator' }, ] function SignInLink(props: { darkBackground?: boolean }) { const { darkBackground } = props const user = useUser() const themeClasses = darkBackground ? '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 {user.name} ) : showLogin ? ( ) : ( <> )} ) } export function Header(props: { darkBackground?: boolean }) { const { darkBackground } = props return (
) }