fix: add back previously deleted trending row selected event (#5512)

* init

* upgrade analytics pkg
This commit is contained in:
lynn 2022-12-02 10:45:13 -05:00 committed by GitHub
parent 04f9127961
commit 53b9a847ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 47 additions and 35 deletions

@ -134,7 +134,7 @@
"@reduxjs/toolkit": "^1.6.1", "@reduxjs/toolkit": "^1.6.1",
"@types/react-relay": "^13.0.2", "@types/react-relay": "^13.0.2",
"@types/react-window-infinite-loader": "^1.0.6", "@types/react-window-infinite-loader": "^1.0.6",
"@uniswap/analytics": "1.1.1", "@uniswap/analytics": "1.2.0",
"@uniswap/analytics-events": "1.1.0", "@uniswap/analytics-events": "1.1.0",
"@uniswap/conedison": "^1.1.0", "@uniswap/conedison": "^1.1.0",
"@uniswap/governance": "^1.0.2", "@uniswap/governance": "^1.0.2",

@ -1,3 +1,6 @@
import { TraceEvent } from '@uniswap/analytics'
import { BrowserEvent, ElementName, EventName } from '@uniswap/analytics-events'
import { useWeb3React } from '@web3-react/core'
import { LoadingBubble } from 'components/Tokens/loading' import { LoadingBubble } from 'components/Tokens/loading'
import { useWindowSize } from 'hooks/useWindowSize' import { useWindowSize } from 'hooks/useWindowSize'
import { useIsMobile } from 'nft/hooks' import { useIsMobile } from 'nft/hooks'
@ -99,6 +102,7 @@ export function Table<D extends Record<string, unknown>>({
...props ...props
}: TableProps<D>) { }: TableProps<D>) {
const theme = useTheme() const theme = useTheme()
const { chainId } = useWeb3React()
const { width } = useWindowSize() const { width } = useWindowSize()
const isMobile = useIsMobile() const isMobile = useIsMobile()
@ -183,6 +187,13 @@ export function Table<D extends Record<string, unknown>>({
prepareRow(row) prepareRow(row)
return ( return (
<TraceEvent
events={[BrowserEvent.onClick]}
name={EventName.NFT_TRENDING_ROW_SELECTED}
properties={{ collection_address: row.original.collection.address, chain_id: chainId }}
element={ElementName.NFT_TRENDING_ROW}
key={i}
>
<StyledRow <StyledRow
{...row.getRowProps()} {...row.getRowProps()}
key={row.id} key={row.id}
@ -214,6 +225,7 @@ export function Table<D extends Record<string, unknown>>({
) )
})} })}
</StyledRow> </StyledRow>
</TraceEvent>
) )
})} })}
</tbody> </tbody>

@ -4135,10 +4135,10 @@
resolved "https://registry.yarnpkg.com/@uniswap/analytics-events/-/analytics-events-1.1.0.tgz#459236d86f864039c3931d21ba80f41575d2ce4e" resolved "https://registry.yarnpkg.com/@uniswap/analytics-events/-/analytics-events-1.1.0.tgz#459236d86f864039c3931d21ba80f41575d2ce4e"
integrity sha512-ZJ99dLhJ4q2c0g0PoMxDPbeC010DrdIBLf7jnUsTf/hYm2LfHryr31Sv204xNO7rWVWHi1dk6jdab8DdBnHgPA== integrity sha512-ZJ99dLhJ4q2c0g0PoMxDPbeC010DrdIBLf7jnUsTf/hYm2LfHryr31Sv204xNO7rWVWHi1dk6jdab8DdBnHgPA==
"@uniswap/analytics@1.1.1": "@uniswap/analytics@1.2.0":
version "1.1.1" version "1.2.0"
resolved "https://registry.yarnpkg.com/@uniswap/analytics/-/analytics-1.1.1.tgz#af9741054f2df61fb595cb3761762bb0a24f8a86" resolved "https://registry.yarnpkg.com/@uniswap/analytics/-/analytics-1.2.0.tgz#38452f31ca249903e0bdc8739f42ed437fdc4911"
integrity sha512-pRoagKfji+Xwh4YuS1ns0mfBfXwUWJlf7H+D3vzIMspTNdJVPG44G8hGM0JN4f9H9+JerFyC+4dXrmLL6rnh+w== integrity sha512-oO9+mhDJVGm2tqFic6PVQ8v75snbLaGymqs3wauwMXrdy4fMeNSCrKfnaGAKElRUYus3eDLMy/cbXy3Md3iRZA==
dependencies: dependencies:
"@amplitude/analytics-browser" "^1.5.8" "@amplitude/analytics-browser" "^1.5.8"
react "^18.2.0" react "^18.2.0"