Skip to content

feat(product): add share button to product details page#574

Open
jyoti430 wants to merge 6 commits into
niharika-mente:mainfrom
jyoti430:feature-product-share
Open

feat(product): add share button to product details page#574
jyoti430 wants to merge 6 commits into
niharika-mente:mainfrom
jyoti430:feature-product-share

Conversation

@jyoti430

@jyoti430 jyoti430 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #424

This PR adds a Share button to the Product Details page, allowing users to quickly copy the current product URL to their clipboard.

Changes Made

  • Added a Share icon beside the product title.
  • Implemented clipboard copy functionality using the Clipboard API.
  • Added a success toast when the product link is copied successfully.
  • Added an error toast if copying the link fails.

Additional Notes

While syncing my branch with the latest main, I resolved merge conflicts in ProductPage.jsx. During this process, I updated the product fetch logic to use the current API response structure (data.data) so the Product Details page continues to render correctly with the latest upstream changes.

Testing

  • Verified the Share button is displayed on the Product Details page.
  • Verified clicking the Share button copies the current product URL to the clipboard.
  • Verified a success toast is shown after copying the link.
  • Verified an error toast is displayed if clipboard copying fails.

Note: ProductPage currently has no existing test suite. Since it depends on routing, API calls, Zustand stores, sockets, and multiple child components, adding isolated tests for this small UI feature would require extensive mocking. I'm happy to add tests if that is the preferred approach.

@vercel

vercel Bot commented Jul 6, 2026

Copy link
Copy Markdown

@jyoti430 is attempting to deploy a commit to the niharika-mente's projects Team on Vercel.

A member of the Team first needs to authorize it.

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.

feat: implement a 'Copy Link to Clipboard' button on the Product Details page

1 participant