update cart button behavior - #459
Merged
Nsanjayboruds merged 5 commits intoJul 13, 2026
Merged
Conversation
Contributor
Author
|
Hi! @Nsanjayboruds I noticed the GitHub Actions workflow is failing due to ESLint errors in
My changes in this PR are limited to the product page UI (temporarily changing the "Add to Cart" button to "Go to Cart" after a successful add-to-cart action), and I didn't modify Could you please confirm whether these are existing issues on the base branch or if there's something I need to update in my branch? I'd be happy to make any changes if required. Thanks! |
Owner
|
@SharayuShelke2006 fix the backed lint |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Summary
Improved the product page user experience by temporarily changing the "Add to Cart" button to "Go to Cart" after a successful add-to-cart action, providing users with quick access to their cart.
Description
This PR introduces a temporary UI state for the primary action button on the Product Detail page.
What changed
Why this approach?
Instead of permanently changing the button based on the product's presence in the cart, this implementation intentionally uses local component state.
This ensures users receive immediate feedback after adding an item while avoiding unintended behavior in cases where they may want to:
This approach improves the shopping experience without modifying the existing cart logic or global state management.
Related Issue
Fixes #458
Type of Change
Checklist
addtocartbutton.1.mp4