track comment tips

This commit is contained in:
mantikoros 2022-06-21 10:36:44 -05:00
parent 9a97da72d8
commit a8b874a32f

View File

@ -12,6 +12,7 @@ import { useEffect, useMemo, useRef, useState } from 'react'
import { CommentTips } from 'web/hooks/use-tip-txns'
import { useUser } from 'web/hooks/use-user'
import { transact } from 'web/lib/firebase/fn-call'
import { track } from 'web/lib/service/analytics'
import { Row } from './layout/row'
import { Tooltip } from './tooltip'
@ -64,6 +65,14 @@ export function Tipper(prop: { comment: Comment; tips: CommentTips }) {
},
description: `${user.name} tipped M$ ${change} to ${comment.userName} for a comment`,
})
track('send comment tip', {
contractId: comment.contractId,
commentId: comment.id,
amount: change,
fromId: user.id,
toId: comment.userId,
})
}, 1500)
)
// instant save on unrender