From dd6c5dc97afea26cf9cbfb802efa4b7b72276c4f Mon Sep 17 00:00:00 2001 From: mantikoros Date: Sat, 20 Aug 2022 13:47:23 -0500 Subject: [PATCH] betting streaks copy --- .../profile/betting-streak-modal.tsx | 2 +- web/pages/notifications.tsx | 20 +++++++++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/web/components/profile/betting-streak-modal.tsx b/web/components/profile/betting-streak-modal.tsx index 8404b89b..eb90f6d9 100644 --- a/web/components/profile/betting-streak-modal.tsx +++ b/web/components/profile/betting-streak-modal.tsx @@ -16,7 +16,7 @@ export function BettingStreakModal(props: { 🔥 - Betting streaks are here! + Daily betting streaks • What are they? diff --git a/web/pages/notifications.tsx b/web/pages/notifications.tsx index c99b226a..9541ee5b 100644 --- a/web/pages/notifications.tsx +++ b/web/pages/notifications.tsx @@ -377,6 +377,7 @@ function IncomeNotificationItem(props: { function reasonAndLink(simple: boolean) { const { sourceText } = notification let reasonText = '' + if (sourceType === 'bonus' && sourceText) { reasonText = !simple ? `Bonus for ${ @@ -385,23 +386,30 @@ function IncomeNotificationItem(props: { : 'bonus on' } else if (sourceType === 'tip') { reasonText = !simple ? `tipped you on` : `in tips on` - } else if (sourceType === 'betting_streak_bonus' && sourceText) { - reasonText = `for your ${ - parseInt(sourceText) / BETTING_STREAK_BONUS_AMOUNT - }-day` + } else if (sourceType === 'betting_streak_bonus') { + reasonText = 'for your' } + + const bettingStreakText = + sourceType === 'betting_streak_bonus' && + (sourceText + ? `🔥 ${ + parseInt(sourceText) / BETTING_STREAK_BONUS_AMOUNT + } day Betting Streak` + : 'Betting Streak') + return ( <> {reasonText} {sourceType === 'betting_streak_bonus' ? ( simple ? ( - Betting Streak + {bettingStreakText} ) : ( - Betting Streak + {bettingStreakText} ) ) : (