-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrate new shop apis + bug fixes (#229)
* fix: use product slug as URL for single product item * chore: add slug to ProductCard types * fix: use slug as product URL * fix: update api URL in useSwagList hook * feat: integrate api endpoints * fix: properly add selected item to localstorage * fix: add id, category, slug and image to cart data * fix: multiply cart quantity by price of one unit * feat: display cart products from local storage * fix: delete dummy cart products * fix: delete from cart functionality * refactor: item quantity button * feat: add more dummy images * fix: linting issues * fix: use product slug as URL * fix: display 'item' or items depending on stock no * feat: handle different API status appropriately in BrowseProducts.jsx * feat: handle different API status appropriately in NewProducts.jsx * feat: display different message if no products are available * feat: handle different API statuses appropriately in /shop/item/:slug * refactor: PopularItemsSection component * feat: handle API statuses appropriately in PopularItemsSection component * fix: linting issues * fix: prevent user from adding item to cart without selecting size * fix: 'image undefined' error if selected product variant lacks images * feat: display shopping cart when user clicks CartIcon * feat: prevent user from adding more items than available stock * fix: 'Maximum update depth exceeded' error in CartDrawer * fix: use UUID as item id in cart to enforce uniqueness * feat: update api endpoints in useCartSwagg and useCartProducts hooks * feat: add item to backend cart when user clicks AddToCart btn * feat: delete item from backend cart when user deletes an item locally * feat: update api endpoint for useDeleteSwag mutation hook * fix: linting issues * feat: update api endpoint for useMakeOrder mutation hook * feat: update payload data for making an order * feat: create useDeleteAllSwag mutation hook * feat: clear backend cart after order * fix: clear backend cart after successful order * feat: clear local cart after successful order * fix: linting issues * fix: item count update bug * fix: linting issue * fix: use item slug as URL in carousel * fix: display item price from API in carousel * fix: linting issues --------- Co-authored-by: sonylomo <sonylomo1@gmail.com>
- Loading branch information
Showing
16 changed files
with
477 additions
and
263 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.