Skip to content

feat: Add dynamic Bounty Countdown Timer (T1 Bounty) (#826)#1260

Open
messiawrq-spec wants to merge 1 commit into
SolFoundry:mainfrom
messiawrq-spec:feat/bounty-countdown-timer
Open

feat: Add dynamic Bounty Countdown Timer (T1 Bounty) (#826)#1260
messiawrq-spec wants to merge 1 commit into
SolFoundry:mainfrom
messiawrq-spec:feat/bounty-countdown-timer

Conversation

@messiawrq-spec
Copy link
Copy Markdown

Claims and resolves #826 (T1 Bounty).

  • Implemented BountyCountdown component using React useState and setInterval to tick down every minute without full-page reloads.
  • Dynamically shifts color thresholds to warn users when under 24 hours (amber) and under 1 hour (rose/red).
  • Smoothly displays Expired once the deadline is surpassed.
  • Replaces the static timeLeft output across BountyCard and BountyDetail with this new real-time component.

Resolves SolFoundry#826.

- Created `BountyCountdown` component that updates every minute without page refresh.
- Shows days/hours/minutes remaining.
- Applies visual urgency colors (`text-amber-500` under 24h, `text-rose-500` under 1h).
- Renders `Expired` in bold red when deadline passes.
- Integrated into `BountyCard` and `BountyDetail`.
@nagiexplorer88
Copy link
Copy Markdown

This still misses the real-time part of #826 in the actual rendered UI. The PR adds frontend/src/components/bounty/BountyCountdown.tsx, but neither BountyCard.tsx nor BountyDetail.tsx imports or renders that component. Both screens still render the plain helper result:

{timeLeft(bounty.deadline)}

That value is only recomputed when the parent component renders, so the countdown will not tick down on its own without a page refresh or unrelated state update. The visible card/detail UI also does not use the <24h / <1h color thresholds from BountyCountdown; BountyDetail keeps a fixed text-status-warning, and the card keeps text-text-muted.

To satisfy the acceptance criteria, the displayed deadline in both BountyCard and BountyDetail should be replaced with the ticking countdown component (or equivalent stateful logic) so it updates without page refresh and shows the urgency colors in the actual UI.

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