Add tracking
This commit is contained in:
parent
8402ceb916
commit
597b208c28
|
@ -10,6 +10,7 @@ import clsx from 'clsx'
|
|||
import { User } from 'common/user'
|
||||
import { useContractFollows } from 'web/hooks/use-follows'
|
||||
import { firebaseLogin } from 'web/lib/firebase/users'
|
||||
import { track } from 'web/lib/service/analytics'
|
||||
|
||||
export const FollowMarketButton = (props: {
|
||||
contract: Contract
|
||||
|
@ -29,11 +30,17 @@ export const FollowMarketButton = (props: {
|
|||
toast('Notifications from this market are now silenced.', {
|
||||
icon: <CheckIcon className={'text-primary h-5 w-5'} />,
|
||||
})
|
||||
track('Unfollow Market', {
|
||||
slug: contract.slug,
|
||||
})
|
||||
} else {
|
||||
await followContract(contract.id, user.id)
|
||||
toast('You are now following this market!', {
|
||||
icon: <CheckIcon className={'text-primary h-5 w-5'} />,
|
||||
})
|
||||
track('Follow Market', {
|
||||
slug: contract.slug,
|
||||
})
|
||||
}
|
||||
}}
|
||||
>
|
||||
|
|
Loading…
Reference in New Issue
Block a user