Skip to content

Commit 8ab65c4

Browse files
committed
fix: progress bar shows true zero + upgrade button links to pricing
1. Progress bar: 0 repos now renders 0% width instead of 2% sliver 2. Upgrade button: opens pricing page in new tab instead of doing nothing
1 parent 970b061 commit 8ab65c4

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

frontend/src/pages/UsagePage.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,11 @@ export function UsagePage() {
6969
Pro: 20 repos, 20K functions/repo, Cohere reranking
7070
</p>
7171
</div>
72-
<Button size="sm" className="ml-4 shrink-0">
72+
<Button
73+
size="sm"
74+
className="ml-4 shrink-0"
75+
onClick={() => window.open('https://opencodeintel.com/#pricing', '_blank')}
76+
>
7377
Upgrade to Pro
7478
<ArrowRight className="w-3.5 h-3.5 ml-1" />
7579
</Button>
@@ -161,7 +165,7 @@ function UsageRow({
161165
<div className="h-1.5 rounded-full bg-muted overflow-hidden">
162166
<div
163167
className={cn('h-full rounded-full transition-all duration-500', barColor)}
164-
style={{ width: `${Math.max(pct, 2)}%` }}
168+
style={{ width: `${pct > 0 ? Math.max(pct, 2) : 0}%` }}
165169
/>
166170
</div>
167171
)}

0 commit comments

Comments
 (0)