Skip to content

Commit

Permalink
feat(hack): Add CTA for live links rewards
Browse files Browse the repository at this point in the history
  • Loading branch information
finnian0826 committed Dec 19, 2024
1 parent 1421494 commit 457aa45
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/dappsExplorer/DappFeaturedActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ interface Props {
style?: StyleProp<ViewStyle>
}

function FeaturedAction({ title, description, Image, style, onPress }: Props) {
export function FeaturedAction({ title, description, Image, style, onPress }: Props) {
return (
<Touchable
style={[styles.pressableCard, style]}
Expand Down
17 changes: 17 additions & 0 deletions src/home/TabHome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { useTranslation } from 'react-i18next'
import { FlatList, RefreshControl, RefreshControlProps, StyleSheet } from 'react-native'
import Animated from 'react-native-reanimated'
import { SafeAreaView, useSafeAreaInsets } from 'react-native-safe-area-context'
import { Colors } from 'react-native/Libraries/NewAppScreen'
import { showMessage } from 'src/alert/actions'
import { AppState } from 'src/app/actions'
import {
Expand All @@ -14,6 +15,7 @@ import {
showNotificationSpotlightSelector,
} from 'src/app/selectors'
import { ALERT_BANNER_DURATION, DEFAULT_TESTNET, SHOW_TESTNET_BANNER } from 'src/config'
import { FeaturedAction } from 'src/dappsExplorer/DappFeaturedActions'
import ActionsCarousel from 'src/home/ActionsCarousel'
import NotificationBox from 'src/home/NotificationBox'
import { refreshAllBalances, visitHome } from 'src/home/actions'
Expand All @@ -24,7 +26,9 @@ import {
showNftCelebrationSelector,
showNftRewardSelector,
} from 'src/home/selectors'
import Trophy from 'src/icons/Trophy'
import { importContacts } from 'src/identity/actions'
import { navigate } from 'src/navigator/NavigationService'
import { Screens } from 'src/navigator/Screens'
import { StackParamList } from 'src/navigator/types'
import { phoneRecipientCacheSelector } from 'src/recipients/reducer'
Expand Down Expand Up @@ -129,6 +133,19 @@ function TabHome(_props: Props) {
key: 'NotificationBox',
component: <NotificationBox showOnlyHomeScreenNotifications={true} />,
},
{
key: 'ReferralCTA',
component: (
<FeaturedAction
title={'Refer your friends to earn rewards'}
description={
'Send your friend a live link and start earning a portion of the revenue they generate.'
}
Image={<Trophy color={Colors.black} />}
onPress={() => navigate(Screens.JumpstartEnterAmount)}
/>
),
},
{
key: 'TransactionFeed',
component: <TransactionFeed />,
Expand Down
14 changes: 14 additions & 0 deletions src/transactions/feed/TransactionFeedV2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,20 @@ import {
Text,
View,
} from 'react-native'
import { Colors } from 'react-native/Libraries/NewAppScreen'
import AppAnalytics from 'src/analytics/AppAnalytics'
import { SwapEvents } from 'src/analytics/Events'
import { NotificationVariant } from 'src/components/InLineNotification'
import SectionHead from 'src/components/SectionHead'
import Toast from 'src/components/Toast'
import { FeaturedAction } from 'src/dappsExplorer/DappFeaturedActions'
import ActionsCarousel from 'src/home/ActionsCarousel'
import GetStarted from 'src/home/GetStarted'
import NotificationBox from 'src/home/NotificationBox'
import Trophy from 'src/icons/Trophy'
import { getLocalCurrencyCode } from 'src/localCurrency/selectors'
import { navigate } from 'src/navigator/NavigationService'
import { Screens } from 'src/navigator/Screens'
import { useDispatch, useSelector } from 'src/redux/hooks'
import { store } from 'src/redux/store'
import { getFeatureGate, getMultichainFeatures } from 'src/statsig'
Expand Down Expand Up @@ -515,6 +520,15 @@ export default function TransactionFeedV2() {
<>
<ActionsCarousel />
<NotificationBox showOnlyHomeScreenNotifications={true} />
<FeaturedAction
title={'Refer your friends to earn rewards'}
description={
'Send your friend a live link and start earning a portion of the revenue they generate.'
}
Image={<Trophy color={Colors.black} />}
onPress={() => navigate(Screens.JumpstartEnterAmount)}
style={{ marginLeft: 16, marginVertical: 16 }}
/>
</>
}
ListEmptyComponent={!showUKCompliantVariant ? <GetStarted /> : <NoActivity />}
Expand Down

0 comments on commit 457aa45

Please sign in to comment.