From c04e6d8df2b27ee87a15e156a7a87a0eea4ea7da Mon Sep 17 00:00:00 2001 From: WRadoslaw Date: Fri, 3 May 2024 10:19:26 +0200 Subject: [PATCH] Ad missing analytics --- .../atlas/src/hooks/useSegmentAnalytics.ts | 10 +++++++ .../YppDashboard/tabs/YppDashboardMainTab.tsx | 29 +++++++++++-------- 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/packages/atlas/src/hooks/useSegmentAnalytics.ts b/packages/atlas/src/hooks/useSegmentAnalytics.ts index 106958b9f6..dec40c88c5 100644 --- a/packages/atlas/src/hooks/useSegmentAnalytics.ts +++ b/packages/atlas/src/hooks/useSegmentAnalytics.ts @@ -565,6 +565,15 @@ export const useSegmentAnalytics = () => { }, [analytics] ) + const trackRoundtableEventsClicked = useCallback( + (channelId: string, channelTier: string) => { + analytics.track('Rewards - Roundtable Events Clicked', { + channelId, + channelTier, + }) + }, + [analytics] + ) const trackShareNftLinkClicked = useCallback( (channelId: string, channelTier: string) => { @@ -686,5 +695,6 @@ export const useSegmentAnalytics = () => { trackTwitterPostLinkClicked, trackRewardsBrandingLinkClicked, trackRewardsReferralLinkClicked, + trackRoundtableEventsClicked, } } diff --git a/packages/atlas/src/views/studio/YppDashboard/tabs/YppDashboardMainTab.tsx b/packages/atlas/src/views/studio/YppDashboard/tabs/YppDashboardMainTab.tsx index 1914cd9f98..547ea25616 100644 --- a/packages/atlas/src/views/studio/YppDashboard/tabs/YppDashboardMainTab.tsx +++ b/packages/atlas/src/views/studio/YppDashboard/tabs/YppDashboardMainTab.tsx @@ -109,6 +109,7 @@ export const YppDashboardMainTab: FC = () => { trackShareNftLinkClicked, trackJoinDiscordLinkClicked, trackShareTokenLinkClicked, + trackRoundtableEventsClicked, } = useSegmentAnalytics() const navigate = useNavigate() const _handleYppSignUpClick = useYppAuthorizeHandler() @@ -126,6 +127,7 @@ export const YppDashboardMainTab: FC = () => { const isSilverOrAbove = ['Verified::Silver', 'Verified::Gold', 'Verified::Diamond'].includes( currentChannel?.yppStatus ?? '' ) + const isBronze = currentChannel?.yppStatus === 'Verified::Bronze' const handleYppSignUpClick = () => { const success = _handleYppSignUpClick() if (success) { @@ -153,6 +155,18 @@ export const YppDashboardMainTab: FC = () => { ) + const silverTierGroup = ( + + {getTierIcon('Verified::Silver')} + + Offers are valid for silver tiers and above. + + {!isBronze ? ( + + ) : null} + + ) + return ( <> @@ -376,7 +390,7 @@ export const YppDashboardMainTab: FC = () => { } actionNode={