diff --git a/packages/web/src/components/track/GatedConditionsPill.tsx b/packages/web/src/components/track/GatedConditionsPill.tsx index 1fd32cc1f21..8f4029fff95 100644 --- a/packages/web/src/components/track/GatedConditionsPill.tsx +++ b/packages/web/src/components/track/GatedConditionsPill.tsx @@ -1,14 +1,11 @@ import { useCallback, type MouseEvent } from 'react' -import { useArtistCoin } from '@audius/common/api' import { isContentUSDCPurchaseGated, AccessConditions, Name, - isContentTokenGated, - TokenGatedConditions + isContentTokenGated } from '@audius/common/models' -import { useBuySellModal } from '@audius/common/store' import { USDC } from '@audius/fixed-decimal' import { Button, ButtonSize, IconLock } from '@audius/harmony' @@ -54,19 +51,10 @@ export const GatedConditionsPill = ({ : messages.locked } - const { data: token } = useArtistCoin( - (streamConditions as TokenGatedConditions)?.token_gate?.token_mint, - { enabled: isTokenGated } - ) - - const { onOpen: openBuySellModal } = useBuySellModal() - const handleClick = useCallback( (e: MouseEvent) => { e.stopPropagation() - if (isTokenGated) { - openBuySellModal({ isOpen: true, ticker: token?.ticker }) - } else { + if (!isTokenGated) { track( make({ eventName: Name.PURCHASE_CONTENT_BUY_CLICKED, @@ -74,17 +62,10 @@ export const GatedConditionsPill = ({ contentType }) ) - onClick?.(e) } + onClick?.(e) }, - [ - contentId, - contentType, - isTokenGated, - onClick, - openBuySellModal, - token?.ticker - ] + [contentId, contentType, isTokenGated, onClick] ) if (isTokenGated) {