Gallery piece 02
JavaScript Frameworks
A React and TypeScript online store built with the Noroff Online Shop API, improved for Portfolio 2 by fixing cart calculation and adding clearer user feedback.
Online Store
Project overview
This project was created for the JavaScript Frameworks course assignment. It is a responsive online store where users can browse products, search with live suggestions, view product details, add items to cart, adjust quantities, complete checkout and use a validated contact form.
What I improved
Based on teacher feedback, I improved the cart experience. I fixed the cart total calculation so discounted product prices are used correctly, and I added visible feedback when a user adds a product to the cart.
Technical improvements
The cart state uses React Context and localStorage to survive refresh. For Portfolio 2, I added a cart message state, accessible toast feedback and an API base URL fallback to make the deployed site more reliable.
Reflection
This project showed me that a feature can technically work but still feel unclear to the user. Adding feedback after cart actions made the interaction feel more complete, and fixing the price calculation made the shopping flow more trustworthy.