Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add streak number #3348

Merged
merged 1 commit into from
Jan 14, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions mani/components/layout/token-toggle-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ export function TokenToggleHeader() {
const user = useUser()
// Check if we're in a tab route - should match paths like /(tabs)/live, /(tabs)/profile, etc.
const isInTabs = isTabPath(pathname)
const isHome = pathname === '/'
const showStreak = isHome && user
const userBalance = !user
? 0
: token === 'MANA'
Expand All @@ -43,6 +45,23 @@ export function TokenToggleHeader() {
<IconSymbol name="arrow.left" size={24} color={color.textTertiary} />
</TouchableOpacity>
)}
{showStreak && (
<Row
style={{
alignItems: 'center',
gap: 2,
}}
>
<ThemedText size="md">🔥</ThemedText>
<ThemedText
color={color.textSecondary}
family={'JetBrainsMono'}
size="md"
>
{user.currentBettingStreak}
</ThemedText>
</Row>
)}

<Row
style={{
Expand Down
Loading