accept challenge button
This commit is contained in:
parent
754d4cb489
commit
a16814b9c7
|
@ -28,7 +28,7 @@ export function AcceptChallengeButton(props: {
|
||||||
setErrorText('')
|
setErrorText('')
|
||||||
}, [open])
|
}, [open])
|
||||||
|
|
||||||
if (!user) return <SignUpPrompt label={'Sign up to accept this challenge'} />
|
if (!user) return <SignUpPrompt label="Accept this bet" className="mt-4" />
|
||||||
|
|
||||||
const iAcceptChallenge = () => {
|
const iAcceptChallenge = () => {
|
||||||
setLoading(true)
|
setLoading(true)
|
||||||
|
|
|
@ -2,17 +2,20 @@ import React from 'react'
|
||||||
import { useUser } from 'web/hooks/use-user'
|
import { useUser } from 'web/hooks/use-user'
|
||||||
import { firebaseLogin } from 'web/lib/firebase/users'
|
import { firebaseLogin } from 'web/lib/firebase/users'
|
||||||
import { withTracking } from 'web/lib/service/analytics'
|
import { withTracking } from 'web/lib/service/analytics'
|
||||||
|
import { Button } from './button'
|
||||||
|
|
||||||
export function SignUpPrompt(props: { label?: string }) {
|
export function SignUpPrompt(props: { label?: string; className?: string }) {
|
||||||
const { label } = props
|
const { label, className } = props
|
||||||
const user = useUser()
|
const user = useUser()
|
||||||
|
|
||||||
return user === null ? (
|
return user === null ? (
|
||||||
<button
|
<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')}
|
onClick={withTracking(firebaseLogin, 'sign up to bet')}
|
||||||
|
className={className}
|
||||||
|
size="lg"
|
||||||
|
color="gradient"
|
||||||
>
|
>
|
||||||
{label ?? 'Sign up to bet!'}
|
{label ?? 'Sign up to bet!'}
|
||||||
</button>
|
</Button>
|
||||||
) : null
|
) : null
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user