challenge bet tracking
This commit is contained in:
parent
f11c9a3341
commit
5e89628593
|
@ -19,6 +19,7 @@ import { QRCode } from '../qr-code'
|
|||
import { copyToClipboard } from 'web/lib/util/copy'
|
||||
import { AmountInput } from '../amount-input'
|
||||
import { getProbability } from 'common/calculate'
|
||||
import { track } from 'web/lib/service/analytics'
|
||||
|
||||
type challengeInfo = {
|
||||
amount: number
|
||||
|
@ -55,7 +56,14 @@ export function CreateChallengeModal(props: {
|
|||
outcome: newChallenge.outcome,
|
||||
contract: contract,
|
||||
})
|
||||
challenge && setChallengeSlug(getChallengeUrl(challenge))
|
||||
if (challenge) {
|
||||
setChallengeSlug(getChallengeUrl(challenge))
|
||||
track('challenge created', {
|
||||
creator: user.username,
|
||||
amount: newChallenge.amount,
|
||||
contractId: contract.id,
|
||||
})
|
||||
}
|
||||
}}
|
||||
challengeSlug={challengeSlug}
|
||||
/>
|
||||
|
|
|
@ -9,6 +9,7 @@ import { CreateChallengeModal } from '../challenges/create-challenge-modal'
|
|||
import { User } from 'common/user'
|
||||
import { CHALLENGES_ENABLED } from 'common/challenge'
|
||||
import { ShareModal } from './share-modal'
|
||||
import { withTracking } from 'web/lib/service/analytics'
|
||||
|
||||
export function ShareRow(props: {
|
||||
contract: Contract
|
||||
|
@ -47,7 +48,10 @@ export function ShareRow(props: {
|
|||
<Button
|
||||
size="lg"
|
||||
color="gray-white"
|
||||
onClick={() => setIsOpen(true)}
|
||||
onClick={withTracking(
|
||||
() => setIsOpen(true),
|
||||
'click challenge button'
|
||||
)}
|
||||
className="animate-bounce"
|
||||
>
|
||||
⚔️ Challenge
|
||||
|
|
Loading…
Reference in New Issue
Block a user