Skip to content

Commit

Permalink
chore: track load more (decentraland#341)
Browse files Browse the repository at this point in the history
  • Loading branch information
cazala authored Jun 14, 2021
1 parent e76e1b9 commit 12593d4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion webapp/src/components/NFTList/NFTList.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { useCallback } from 'react'
import { Card, Button, Loader } from 'decentraland-ui'
import { t } from 'decentraland-dapps/dist/modules/translation/utils'
import { getAnalytics } from 'decentraland-dapps/dist/modules/analytics/utils'

import { getMaxQuerySize, MAX_PAGE, PAGE_SIZE } from '../../modules/vendor/api'
import { NFTCard } from '../NFTCard'
Expand All @@ -10,7 +11,9 @@ const NFTList = (props: Props) => {
const { vendor, nfts, page, count, isLoading, onBrowse } = props

const handleLoadMore = useCallback(() => {
onBrowse({ page: page + 1 })
const newPage = page + 1
onBrowse({ page: newPage })
getAnalytics().track('Load more', { page: newPage })
}, [onBrowse, page])

const maxQuerySize = getMaxQuerySize(vendor)
Expand Down

0 comments on commit 12593d4

Please sign in to comment.