2022-05-25 16:25:39 +00:00
|
|
|
import React from 'react'
|
|
|
|
import { useUser } from 'web/hooks/use-user'
|
|
|
|
import { firebaseLogin } from 'web/lib/firebase/users'
|
2022-06-15 21:34:34 +00:00
|
|
|
import { withTracking } from 'web/lib/service/analytics'
|
2022-08-19 17:07:48 +00:00
|
|
|
import { Button, SizeType } from './button'
|
2022-05-25 16:25:39 +00:00
|
|
|
|
2022-08-28 20:44:22 +00:00
|
|
|
export function BetSignUpPrompt(props: {
|
2022-08-19 17:07:48 +00:00
|
|
|
label?: string
|
|
|
|
className?: string
|
|
|
|
size?: SizeType
|
|
|
|
}) {
|
|
|
|
const { label, className, size = 'lg' } = props
|
2022-05-25 16:25:39 +00:00
|
|
|
const user = useUser()
|
|
|
|
|
|
|
|
return user === null ? (
|
2022-08-04 21:27:02 +00:00
|
|
|
<Button
|
2022-06-15 21:34:34 +00:00
|
|
|
onClick={withTracking(firebaseLogin, 'sign up to bet')}
|
2022-08-04 21:27:02 +00:00
|
|
|
className={className}
|
2022-08-19 17:07:48 +00:00
|
|
|
size={size}
|
2022-08-04 21:27:02 +00:00
|
|
|
color="gradient"
|
2022-05-25 16:25:39 +00:00
|
|
|
>
|
2022-09-08 05:16:48 +00:00
|
|
|
{label ?? 'Sign up to trade!'}
|
2022-08-04 21:27:02 +00:00
|
|
|
</Button>
|
2022-05-25 16:25:39 +00:00
|
|
|
) : null
|
|
|
|
}
|