Skip to content

feat: add countdown timer component for bounty deadlines (Fixes #826)#1361

Open
zeroknowledge0x wants to merge 1 commit into
SolFoundry:mainfrom
zeroknowledge0x:feat/countdown-timer
Open

feat: add countdown timer component for bounty deadlines (Fixes #826)#1361
zeroknowledge0x wants to merge 1 commit into
SolFoundry:mainfrom
zeroknowledge0x:feat/countdown-timer

Conversation

@zeroknowledge0x
Copy link
Copy Markdown

Summary

Implements a countdown timer component that shows time remaining until bounty deadline, as requested in issue #826.

Changes

  • Created component with real-time countdown (updates every second)
  • Shows days, hours, minutes, seconds remaining
  • Color-coded urgency levels:
    • Normal: muted text color (>24h remaining)
    • Warning: amber color (<24h remaining)
    • Urgent: red color with pulse animation (<1h remaining)
    • Expired: grayed out when deadline passes
  • Created with utility functions (timeLeft, timeAgo, formatCurrency, etc.)
  • Updated to use CountdownTimer
  • Updated to use CountdownTimer

Acceptance Criteria

  • Timer displays on bounty cards and detail page
  • Updates without page refresh (1-second interval)
  • Visual urgency indicators (color changes and pulse animation)

Technical Details

  • Uses React useEffect with setInterval for real-time updates
  • Cleans up interval on unmount
  • Stops updating when deadline expires
  • Responsive design with Tailwind CSS

Closes #826

- Create CountdownTimer component with real-time countdown
- Shows days, hours, minutes, seconds remaining
- Color-coded urgency: normal (muted), warning (<24h, amber), urgent (<1h, red)
- Shows 'Expired' state when deadline passes
- Pulse animation when urgent
- Create lib/utils.ts with timeLeft, timeAgo, formatCurrency utilities
- Update BountyCard to use CountdownTimer
- Update BountyDetail to use CountdownTimer

Closes SolFoundry#826
@zeroknowledge0x
Copy link
Copy Markdown
Author

Hi maintainers! 👋

Just a friendly follow-up — all CI checks are passing:

  • ✅ AI Code Review (trigger-review)
  • ✅ Wallet Check (check-wallet)
  • ✅ CodeRabbit review

The countdown timer component is ready for review. Happy to address any feedback!

Thanks for your time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

missing-wallet PR is missing a Solana wallet for bounty payout

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🏭 Bounty T1: Bounty Countdown Timer Component

2 participants