Skip to content

Commit 576c8c1

Browse files
committed
update main page ui
1 parent 78e0b7f commit 576c8c1

File tree

1 file changed

+21
-9
lines changed

1 file changed

+21
-9
lines changed

client/src/App.jsx

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import { useEffect, useState } from "react";
2+
import { Row, Col, Card, Typography, Divider } from "antd";
23
import "./App.css";
34

5+
const { Title } = Typography;
6+
const { Meta } = Card;
7+
48
function App() {
59
const [data, setData] = useState(null);
610

@@ -13,15 +17,23 @@ function App() {
1317

1418
return (
1519
<div>
16-
<h1>React Node Web Scraper</h1>
17-
{data &&
18-
data.map((item, index) => (
19-
<div key={index}>
20-
<h4>{item.name}</h4>
21-
<img src={item.img} alt={item.name} width={100} height={100} />
22-
<p>{item.price}</p>
23-
</div>
24-
))}
20+
<header>
21+
<Title>StoreBot</Title>
22+
<Divider />
23+
</header>
24+
<Row gutter={16}>
25+
{data &&
26+
data.map((item, index) => (
27+
<Col span={6} key={index} gutter={20}>
28+
<Card
29+
bordered={false}
30+
cover={<img alt={item.name + " picture"} src={item.img} />}
31+
>
32+
<Meta title={item.name} description={item.price} />
33+
</Card>
34+
</Col>
35+
))}
36+
</Row>
2537
</div>
2638
);
2739
}

0 commit comments

Comments
 (0)