-
Notifications
You must be signed in to change notification settings - Fork 178
Implemented Wishlist, Cart, and Checkout Features with UI and Config Updates #492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Thank you for your contribution! 🎉PR Checklist
Next Steps
Need help? Check our Contributing Guide Happy coding! 💻 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements comprehensive shopping functionality for the MsCafe app, including wishlist management, enhanced cart operations, and checkout workflow. The changes provide a complete e-commerce experience with persistent data storage and improved user interface components.
- Adds wishlist functionality with ability to add/remove items and move between cart and wishlist
- Enhances cart with improved UI, quantity controls, and localStorage persistence
- Implements floating cart/wishlist buttons and enhanced product interaction components
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/componets/FloatingCart.js | New floating cart/wishlist widget with mini-cart preview functionality |
| src/componets/AddToCartButton.js | Enhanced add-to-cart component with quantity controls and buy-now functionality |
| src/Store/cartSlice.js | Updated Redux slice with wishlist actions and localStorage persistence |
| src/Pages/wishlist.js | New wishlist page with product management and cart integration |
| src/Pages/cart.js | Enhanced cart page with improved UI and wishlist integration |
| src/Pages/Shop.js | Updated shop page to integrate new components and wishlist functionality |
| src/App.js | Added wishlist route and duplicate component rendering |
Comments suppressed due to low confidence (1)
src/Store/cartSlice.js:54
- Missing closing brace for the if statement. The else block is not properly closed, which will cause a syntax error.
} else {
src/App.js
Outdated
| <Chatbot /> | ||
|
|
||
|
|
||
| <ToastContainer position="top-right" autoClose={2000} /> |
Copilot
AI
Aug 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are duplicate component renderings in this file. The ToastContainer, ContentContainer with Routes, Reviews, Chatbot, and Footer components are rendered twice, which will cause rendering issues and potential conflicts.
| dispatch(addToCart(product)); | ||
| toast.success(`${product.name} added to cart! Redirecting to checkout...`, { autoClose: 2000 }); | ||
| // Navigate to cart page after a short delay | ||
| setTimeout(() => { |
Copilot
AI
Aug 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using window.location.href for navigation in a React SPA breaks the single-page application pattern. Consider using navigate('/cart') from react-router-dom instead of setTimeout with window.location.href.
src/Pages/wishlist.js
Outdated
| dispatch(removeFromWishlist(item.id)); | ||
| toast.success(`${item.name} added to cart! Redirecting to checkout...`, { autoClose: 2000 }); | ||
| setTimeout(() => { | ||
| window.location.href = '/cart'; |
Copilot
AI
Aug 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using window.location.href for navigation in a React SPA breaks the single-page application pattern. Use navigate('/cart') instead to maintain SPA behavior and avoid full page reloads.
| window.location.href = '/cart'; | |
| navigate('/cart'); |
src/Pages/wishlist.js
Outdated
| margin: 0 auto; | ||
| background-color: #fffbeb; | ||
| padding-top: 1.5rem; | ||
| padding-top: 1.5rem; |
Copilot
AI
Aug 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The padding-top property is declared twice with the same value (1.5rem). Remove the duplicate declaration.
| padding-top: 1.5rem; |
|
@Rutwika1409 fix this i'll merge it |
git push origin feature/cart-wishlist
|
@Rutwika1409 is attempting to deploy a commit to the mujtabaa07's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Deployment failed with the following error: |
…updates
Pull Request Template
Summary
This PR adds full wishlist, cart, and checkout functionality to the MsCafe app.
It also fixes a UI bug where the quantity toggle (- / +) was not appearing after an item was added to the cart from the shop.
Layout spacing, responsiveness, and cart/wishlist interaction have been refined to closely match the shop page UI.
Includes Tailwind and PostCSS config improvements and a SPA-friendly routing fix in nginx.
Fixes # (issue)
Type of Change
Please mark [X] for applicable items:
Testing
Tested locally by:
/checkoutroute loads correctlyScreenshots/Videos
Checklist
Please mark [X] for completed items: