Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
Add "Join Telegram" card in User Journey
Browse files Browse the repository at this point in the history
  • Loading branch information
ILIYANGERMANOV committed Jun 11, 2022
1 parent 5e87c9d commit 5a9187d
Showing 1 changed file with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class CustomerJourneyLogic(
didYouKnow_expensesPieChart(),
rateUsCard(),
shareIvyWalletCard(),
joinIvyTelegramCard(),
// buyLifetimeOfferCard(),
makeReportCard(),
rateUsCard_2(),
Expand Down Expand Up @@ -179,6 +180,22 @@ class CustomerJourneyLogic(
}
)

fun joinIvyTelegramCard() = CustomerJourneyCardData(
id = "join_ivy_telegram",
condition = { trnCount, _, _ ->
trnCount >= 16
},
description = "It seems like that you're enjoying Ivy Wallet! Feel free join our invite-only Ivy Telegram Community and make our app better :)",
title = "Ivy Community",
cta = "Join now",
ctaIcon = R.drawable.ic_telegram_24dp,
backgroundColor = Blue,
hasDismiss = true,
onAction = { navigation, _, _ ->
navigation.navigateTo(Paywall(paywallReason = null))
}
)

fun buyLifetimeOfferCard() = CustomerJourneyCardData(
id = "buy_lifetime_offer",
condition = { trnCount, _, ivyContext ->
Expand Down Expand Up @@ -346,6 +363,18 @@ private fun PreviewShareIvyWallet() {
}
}

@Preview
@Composable
private fun PreviewJoinTelegram() {
IvyWalletComponentPreview {
CustomerJourneyCard(
cardData = CustomerJourneyLogic.joinIvyTelegramCard(),
onCTA = { },
onDismiss = {}
)
}
}

@Preview
@Composable
private fun PreviewBuyLifetimeOffer() {
Expand Down

0 comments on commit 5a9187d

Please sign in to comment.