Fix betting streak number
This commit is contained in:
parent
51380febd4
commit
93739e7990
|
@ -31,10 +31,7 @@ import {
|
||||||
import { TrendingUpIcon } from '@heroicons/react/outline'
|
import { TrendingUpIcon } from '@heroicons/react/outline'
|
||||||
import { formatMoney } from 'common/util/format'
|
import { formatMoney } from 'common/util/format'
|
||||||
import { groupPath } from 'web/lib/firebase/groups'
|
import { groupPath } from 'web/lib/firebase/groups'
|
||||||
import {
|
import { UNIQUE_BETTOR_BONUS_AMOUNT } from 'common/economy'
|
||||||
BETTING_STREAK_BONUS_AMOUNT,
|
|
||||||
UNIQUE_BETTOR_BONUS_AMOUNT,
|
|
||||||
} from 'common/economy'
|
|
||||||
import { groupBy, sum, uniq } from 'lodash'
|
import { groupBy, sum, uniq } from 'lodash'
|
||||||
import { track } from '@amplitude/analytics-browser'
|
import { track } from '@amplitude/analytics-browser'
|
||||||
import { Pagination } from 'web/components/pagination'
|
import { Pagination } from 'web/components/pagination'
|
||||||
|
@ -44,6 +41,7 @@ import { redirectIfLoggedOut } from 'web/lib/firebase/server-auth'
|
||||||
import { SiteLink } from 'web/components/site-link'
|
import { SiteLink } from 'web/components/site-link'
|
||||||
import { NotificationSettings } from 'web/components/NotificationSettings'
|
import { NotificationSettings } from 'web/components/NotificationSettings'
|
||||||
import { SEO } from 'web/components/SEO'
|
import { SEO } from 'web/components/SEO'
|
||||||
|
import { useUser } from 'web/hooks/use-user'
|
||||||
|
|
||||||
export const NOTIFICATIONS_PER_PAGE = 30
|
export const NOTIFICATIONS_PER_PAGE = 30
|
||||||
const MULTIPLE_USERS_KEY = 'multipleUsers'
|
const MULTIPLE_USERS_KEY = 'multipleUsers'
|
||||||
|
@ -378,6 +376,8 @@ function IncomeNotificationItem(props: {
|
||||||
const [highlighted] = useState(!notification.isSeen)
|
const [highlighted] = useState(!notification.isSeen)
|
||||||
const { width } = useWindowSize()
|
const { width } = useWindowSize()
|
||||||
const isMobile = (width && width < 768) || false
|
const isMobile = (width && width < 768) || false
|
||||||
|
const user = useUser()
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setNotificationsAsSeen([notification])
|
setNotificationsAsSeen([notification])
|
||||||
}, [notification])
|
}, [notification])
|
||||||
|
@ -403,9 +403,7 @@ function IncomeNotificationItem(props: {
|
||||||
const bettingStreakText =
|
const bettingStreakText =
|
||||||
sourceType === 'betting_streak_bonus' &&
|
sourceType === 'betting_streak_bonus' &&
|
||||||
(sourceText
|
(sourceText
|
||||||
? `🔥 ${
|
? `🔥 ${user?.currentBettingStreak ?? 0} day Betting Streak`
|
||||||
parseInt(sourceText) / BETTING_STREAK_BONUS_AMOUNT
|
|
||||||
} day Betting Streak`
|
|
||||||
: 'Betting Streak')
|
: 'Betting Streak')
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in New Issue
Block a user