Skip to content

Commit

Permalink
Add fallback to GitHub stars number
Browse files Browse the repository at this point in the history
  • Loading branch information
mlejva committed Jul 19, 2024
1 parent 8a30b7c commit c931525
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/web/src/components/TopLevelNavItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default function TopLevelNavItem({
statType?: string
icon: React.ReactNode
}) {
const statFormatted = stat
const statFormatted = stat?.toLocaleString() || '6,300+'
let statText = ''
if (statType === 'discordUsers') statText = 'online'
else if (statType === 'githubStars') statText = '⭐️'
Expand All @@ -37,7 +37,7 @@ export default function TopLevelNavItem({
>
{icon}
<div className="overflow-hidden font-medium">
GitHub ({statFormatted?.toLocaleString()} {statText})
GitHub ({statFormatted} {statText})
</div>
</div>
</Link>
Expand Down

0 comments on commit c931525

Please sign in to comment.