Skip to content

CountdownTimer displays negative values after the deadline has passed #632

Description

@Kingsman-99

Description

When the deadline tracked by CountdownTimer passes, the timer continues counting downward into negative values (e.g. "-1d -3h"). After the deadline the timer should stop at zero and display a configurable "Expired" or "Time's up" label instead of a negative count.

Acceptance Criteria

  • When deadline < now the timer displays "Expired" (or a expiredLabel prop value) instead of negative numbers
  • The interval is cleared when the deadline passes so the component stops re-rendering
  • The component correctly transitions from counting down to showing the expired state without a page reload
  • Existing tests continue to pass

Context

  • Target file: src/components/CountdownTimer.tsx

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions