Skip to content

web: extract drand countdown formatting into a shared, testable lib #195

Description

@karagozemin

formatCountdown and the quicknet epoch math currently live inside the useDrandCountdown React hook, so they can't be reused or unit-tested outside React.

Move the pure parts into src/lib/countdown.ts and add a formatDuration helper to src/lib/format.ts, with unit tests for both.

Activity

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

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardThird CampaignCampaign: Third Campaign

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions