-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProductStore.jsx
More file actions
29 lines (26 loc) · 787 Bytes
/
Copy pathProductStore.jsx
File metadata and controls
29 lines (26 loc) · 787 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import React from "react";
const products = [
{ id: 1, name: "Minimal Sneakers", price: 129, category: "Footwear" },
{ id: 2, name: "Classic Backpack", price: 89, category: "Accessories" },
{ id: 3, name: "Premium Hoodie", price: 79, category: "Clothing" },
];
export default function ProductStore() {
return (
<main>
<header>
<h1>Online Store</h1>
<p>Discover products and enjoy a simple shopping experience.</p>
</header>
<section>
{products.map((product) => (
<article key={product.id}>
<p>{product.category}</p>
<h2>{product.name}</h2>
<strong>${product.price}</strong>
<button>Add to Cart</button>
</article>
))}
</section>
</main>
);
}