diff --git a/01-frontend/src/pages/Home.tsx b/01-frontend/src/pages/Home.tsx index 3619169..d5635ef 100644 --- a/01-frontend/src/pages/Home.tsx +++ b/01-frontend/src/pages/Home.tsx @@ -21,7 +21,7 @@ export default function Home() { name: "Item 2", description: "Description 2", price: 20, - stock: 200, + stock: 9, category: "Category 2", rating: 4.0, discount: 20, @@ -31,7 +31,7 @@ export default function Home() { name: "Item 3", description: "Description 3", price: 30, - stock: 300, + stock: 10, category: "Category 3", rating: 4.8, discount: 15, @@ -41,7 +41,7 @@ export default function Home() { name: "Item 3", description: "Description 3", price: 30, - stock: 300, + stock: 0, category: "Category 3", rating: 4.8, discount: 15, diff --git a/01-frontend/src/pages/Product.tsx b/01-frontend/src/pages/Product.tsx index 2b59c17..ded5bf3 100644 --- a/01-frontend/src/pages/Product.tsx +++ b/01-frontend/src/pages/Product.tsx @@ -130,17 +130,15 @@ export default function Product() { - - {item.description} - - - {item.stock > 0 ? ( - + {item.stock > 10 ? ( + In Stock ({item.stock} available) + ) : item.stock > 0 ? ( + Almost sold out ({item.stock} available) ) : ( - Out of Stock + Out of Stock )} @@ -171,9 +169,16 @@ export default function Product() { Free shipping on orders over €50 + +
+ +
+ + {item.description} + );