File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
packages/thirdweb/src/react/web/ui/Bridge/swap-widget Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 11"use client" ;
22
3+ import { useQuery } from "@tanstack/react-query" ;
34import { useCallback , useEffect , useState } from "react" ;
5+ import { trackPayEvent } from "../../../../../analytics/track/pay.js" ;
46import type { Buy , Sell } from "../../../../../bridge/index.js" ;
57import type { TokenWithPrices } from "../../../../../bridge/types/Token.js" ;
68import type { ThirdwebClient } from "../../../../../client/client.js" ;
@@ -241,6 +243,17 @@ export type SwapWidgetProps = {
241243 * @bridge
242244 */
243245export function SwapWidget ( props : SwapWidgetProps ) {
246+ useQuery ( {
247+ queryFn : ( ) => {
248+ trackPayEvent ( {
249+ client : props . client ,
250+ event : "ub:ui:swap_widget:render" ,
251+ } ) ;
252+ return true ;
253+ } ,
254+ queryKey : [ "swap_widget:render" ] ,
255+ } ) ;
256+
244257 return (
245258 < SwapWidgetContainer
246259 theme = { props . theme }
You can’t perform that action at this time.
0 commit comments