homepage: fix betting streaks error

This commit is contained in:
mantikoros 2022-09-18 16:05:13 -05:00
parent f111d6e24f
commit 540915eb65

View File

@ -281,8 +281,8 @@ function DailyStats(props: {
const [first, last] = [metrics[0], metrics[metrics.length - 1]]
const privateUser = usePrivateUser()
const streaksHidden =
privateUser?.notificationPreferences.betting_streaks.length === 0
const streaks = privateUser?.notificationPreferences?.betting_streaks ?? []
const streaksHidden = streaks.length === 0
let profit = 0
let profitPercent = 0