Skip to content

feat: implement add to cart functionality with products page and cart management - #44

Open
sayali-git-hub wants to merge 2 commits into
Vikram-sardiwal:mainfrom
sayali-git-hub:feature/add-to-cart
Open

sayali-git-hub wants to merge 2 commits into
Vikram-sardiwal:mainfrom
sayali-git-hub:feature/add-to-cart

Conversation

@sayali-git-hub

Copy link
Copy Markdown

What changes were made

  • Created ProductsPage that fetches products from Fake Store API
  • Created ProductCard component with Add to Cart button and toast notification
  • Created CartPage with item list, quantity controls, remove button and total price
  • Created CartContext and CartProvider for global cart state management
  • Added /products and /cart routes to App.jsx
  • Added Products and Cart links to Navbar
  • Cart state persists across route changes using React Context

Related Issue

Closes #14

Screenshots

Screenshot 2026-08-28 at 8 07 14 PM Screenshot 2026-08-28 at 8 07 06 PM

Checklist

  • Created a separate branch
  • Tested changes locally
  • Ran npm run lint successfully
  • No console errors
  • Existing functionality still works

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.

Implement Add to Cart Functionality

1 participant