Skip to content

Commit 8f2b452

Browse files
authored
Merge pull request #628 from Priyanka0205-CSE/fix/sync-cooldown-feedback
fix: add visual cooldown progress bar for sync button
2 parents 59e40e1 + 7753315 commit 8f2b452

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

src/pages/GitRank.jsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -786,6 +786,19 @@ export const GitRank = () => {
786786
: "Sync Data"}
787787
</GradientButton>
788788

789+
{cooldownSeconds > 0 && (
790+
<div className="w-full">
791+
<div className="w-full h-1.5 bg-slate-100 dark:bg-slate-800 rounded-full overflow-hidden">
792+
<div
793+
className="h-full bg-violet-500 rounded-full transition-all duration-1000"
794+
style={{ width: `${(cooldownSeconds / 300) * 100}%` }}
795+
/>
796+
</div>
797+
<p className="text-[10px] text-slate-400 font-medium text-center mt-1">
798+
Cooldown: {formatCooldown(cooldownSeconds)} remaining
799+
</p>
800+
</div>
801+
)}
789802
{userData?.lastSync && (
790803
<span className="text-[10px] sm:text-xs text-slate-400 font-medium">
791804
Last sync:{" "}

0 commit comments

Comments
 (0)