react-e-commerce- icon indicating copy to clipboard operation
react-e-commerce- copied to clipboard

Enhanced UX: Added Cart Badge, Clear Cart Feature, and 404 Routing

Open codeCraft-Ritik opened this issue 10 months ago • 0 comments

Description: Dynamic Cart Badge: Updated src/components/NavBar.js to display a real-time item count on the shopping bag icon using Redux state.

Clear Cart Functionality: * Added a clearCart action in src/redux-state/CartState.js to reset the cart.

Implemented a "Clear Cart" button in src/components/CartHold.js to allow users to empty their cart with one click.

404 Page Handling: Added a catch-all route in src/App.js to display a "Page Not Found" message for invalid URLs, improving site navigation.

Code Refactoring: Optimized the NavBar component by replacing multiple boolean states with a single activeDropdown state for better scalability and cleaner code.

codeCraft-Ritik avatar Jan 19 '26 08:01 codeCraft-Ritik