Skip to content

feat: resolves issue #21 - add copy route details button - #61

Merged
ToryMic merged 1 commit into
BreachDirect:mainfrom
Max-Owolabi:issue-21
Aug 10, 2026
Merged

feat: resolves issue #21 - add copy route details button#61
ToryMic merged 1 commit into
BreachDirect:mainfrom
Max-Owolabi:issue-21

Conversation

@Max-Owolabi

Copy link
Copy Markdown
Contributor

Summary

Resolves #21 — adds a Copy details button to each route card that copies the route path, fee, and time as plain text to the clipboard.

Changes

  • src/components/RouteCard.jsx: builds a plain-text summary (Route:, You receive:, Total fee:, Est. time:, per-hop details) and copies it via the Clipboard API, with an execCommand('copy') fallback for browsers/insecure contexts where navigator.clipboard is unavailable. Button shows "Copied!" for 2s as feedback (aria-live="polite").
  • src/styles.css: styling for the new .copy-button.
  • tests/RouteCard.test.jsx: component tests covering rendering, the Clipboard API path, the fallback path, and the copied plain-text format.
  • CHANGELOG.md: entry under Unreleased.

Verification

  • npm test passes (15/15, including 3 new RouteCard tests).
  • npm run build passes.

@ToryMic
ToryMic merged commit c586838 into BreachDirect:main Aug 10, 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.

Add a 'copy route details' button on RouteCard

2 participants