feat(share): Add Copy Link Button to ShareButtons Component - #8345
feat(share): Add Copy Link Button to ShareButtons Component#8345tmdeveloper007 wants to merge 1 commit into
Conversation
|
@tmdeveloper007 is attempting to deploy a commit to the jhasourav07's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
This PR enhances the user experience by providing a quick way to copy URLs directly from the ShareButtons component. It leverages the existing |
|
👋 Hey @tmdeveloper007! Thanks for your interest in contributing to CommitPulse! 🙏 Unfortunately, this PR has been automatically closed because you are not assigned to the linked issue #8335 — feat(share): add copy-link button to ShareButtons component. To avoid this in the future, please follow these steps:
We look forward to your contribution once you're assigned! 🚀 |
Summary of What Has Been Done
Added a copy-link button to
components/ShareButtons.tsxthat copies the share URL to the clipboard when clicked. Uses the existingcopyToClipboardutility with graceful fallback todocument.execCommandfor older browsers.Changes Made
FaLinkicon fromreact-icons/fa6, import ofcopyToClipboardfrom@/utils/clipboard, and a<button>witharia-label="Copy link to clipboard". The button gracefully handles clipboard API failures silently.navigator.clipboard.writeTextwith the correct URL.Impact it Made
Improves UX by providing a quick way to copy the URL without opening a social media share dialog. Follows accessibility best practices with proper aria labels.
Closes #8335
Note: Please assign this PR to the
tmdeveloper007account.