Skip to content

Commit

Permalink
fix leaderboard progress
Browse files Browse the repository at this point in the history
  • Loading branch information
almeidx committed Jun 9, 2024
1 parent 546b69f commit 17194bd
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/components/RadialProgressBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,17 @@ export function RadialProgressBar({ color, percentage, num }: RadialProgressBarP
return (
<div className="relative inline-block">
<svg className="size-12" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
<circle className="stroke-current" cx="50" cy="50" r={radius} fill="transparent" strokeWidth={strokeWidth} />
<circle cx="50" cy="50" r={radius} stroke="#ffffff" strokeWidth={strokeWidth} fill="none" />
<circle
cx="50"
cy="50"
r={radius}
fill="transparent"
stroke={color ?? "url(#percentual-gradient)"}
strokeWidth={strokeWidth}
fill="none"
strokeDasharray={circumference}
strokeDashoffset={circumference - progress}
strokeDashoffset={progress}
transform="rotate(-90 50 50)"
className="stroke-current"
style={{ stroke: color ?? "url(#percentual-gradient)" }}
/>
<text x="50%" y="50%" dominantBaseline="middle" textAnchor="middle" fill="currentColor" className="text-3xl">
{num}
Expand Down

0 comments on commit 17194bd

Please sign in to comment.