diff --git a/db.json b/db.json
index 8c31a69..546f583 100644
--- a/db.json
+++ b/db.json
@@ -2,14 +2,14 @@
"products": [
{
"id":1,
- "name":"Sneakers Red & White 2025",
+ "name":"Кросовки Red & White 2025",
"brand":"NIKE",
"price":38.0,
"imageUrl":"./assets/images/sneakers-image.jpg"
},
{
"id":2,
- "name":"Sneakers Red & White 2025",
+ "name":"Кросовки белые 2024",
"brand":"NIKE",
"price":40.0,
"imageUrl":"./assets/images/sneakers-image.jpg"
diff --git a/src/App.jsx b/src/App.jsx
index aaf6c13..98cc938 100644
--- a/src/App.jsx
+++ b/src/App.jsx
@@ -98,7 +98,7 @@ function ToolTip() {
return
Высота: {height}
}
-function Product() {
+function Product({ name, brand, price, url }) {
const [isLiked, setIsLiked] = React.useState(false)
const toggleLike = () => {
@@ -115,7 +115,7 @@ function Product() {
-
Sneakers Red & White 2025
+
{name}
-
NIKE
-
$38.00
+
{brand}
+
${price}
)
}
+function MyComponent({ children }) {
+ return {children}
;
+}
+
+function RowList({ children }) {
+ return (
+
+ {children.map(child => (
+
{child}
+ ))}
+
{React.Children.count(children)}
+
+ );
+}
+
function App() {
const [products,setProducts] = React.useState([]);
@@ -154,8 +169,7 @@ function App() {
React.useEffect(() => {
getProducts();
},[]);
-
-
+ console.log({...products});
return (
<>
@@ -163,19 +177,24 @@ function App() {
- -
-
-
- -
-
-
- -
-
-
+ {products.map(product => (
+ -
+
+
+ ))}
+
+ Заголовок
+ Привет!
+
+
+
+ - первый
+ - второй
+ - третий
+
+
-
-
>
)
}