manifold/web/components/sign-up-prompt.tsx
2022-06-15 16:58:52 -05:00

18 lines
581 B
TypeScript

import React from 'react'
import { useUser } from 'web/hooks/use-user'
import { firebaseLogin } from 'web/lib/firebase/users'
import { withTracking } from 'web/lib/service/analytics'
export function SignUpPrompt() {
const user = useUser()
return user === null ? (
<button
className="btn flex-1 whitespace-nowrap border-none bg-gradient-to-r from-indigo-500 to-blue-500 px-10 text-lg font-medium normal-case hover:from-indigo-600 hover:to-blue-600"
onClick={withTracking(firebaseLogin, 'sign up to bet')}
>
Sign up to bet!
</button>
) : null
}