Skip to content

Use local deadline displays and live countdowns#247

Merged
msaroufim merged 1 commit into
mainfrom
local-deadline-countdowns
Jun 29, 2026
Merged

Use local deadline displays and live countdowns#247
msaroufim merged 1 commit into
mainfrom
local-deadline-countdowns

Conversation

@msaroufim

Copy link
Copy Markdown
Member

Summary

Updates leaderboard deadline presentation so users see times in their browser timezone instead of a hard-coded UTC string.

Also updates homepage countdowns to refresh client-side once per second and switch to minutes/seconds when less than one hour remains, avoiding the unhelpful 0 days 0 hours remaining state near a deadline.

Details

  • Adds toDateLocal for browser-local deadline formatting with a UTC fallback.
  • Uses local deadline strings on leaderboard detail and editor headers.
  • Makes getTimeLeft accept an explicit clock value and return minute/second precision under one hour.
  • Adds a lightweight homepage interval to update countdown text and active/closed grouping without reloading.
  • Narrows a homepage test link query now that the sponsor mail link is also present.

Validation

  • npm test -- --run src/lib/date/utils.test.ts src/pages/home/Home.test.tsx
  • npm run build

@msaroufim msaroufim marked this pull request as ready for review June 29, 2026 23:38
@msaroufim msaroufim merged commit a7a27fb into main Jun 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant