Skip to content

Commit a603f3d

Browse files
committed
Add more buttons in product details page
1 parent 0f3774f commit a603f3d

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

src/components/Home/GuestLinks.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const GuestLinks = () => {
1313
<p>Please login with account & password below.</p>
1414
<p className="home-text-light">
1515
Account:
16-
<span> admin</span>
16+
<span> tester</span>
1717
</p>
1818
<p className="home-text-light">
1919
Password: <span> 123456</span>

src/components/Products/ProductItem.tsx

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ import { useParams } from 'react-router-dom';
55
import { Row, Col, Image, Button } from 'antd';
66
import { NotFound } from 'src/components/Error/404';
77
import { useHistory } from 'react-router-dom';
8+
import {
9+
ArrowLeftOutlined,
10+
DeleteOutlined,
11+
EditOutlined,
12+
} from '@ant-design/icons';
813

914
const mapStateToProps = (state: AppState) => ({
1015
product: state.products.product,
@@ -44,10 +49,18 @@ export const _ProductItem = (props: Props) => {
4449
</p>
4550
</Col>
4651
</Row>
47-
<Row className="mt-2">
48-
<Col offset={12}>
49-
<Button type="primary" onClick={goBack}>
50-
Go Back
52+
<Row className="mt-2" gutter={[16, 16]}>
53+
<Col span={6} offset={12}>
54+
<Button onClick={goBack}>
55+
<ArrowLeftOutlined /> Go Back
56+
</Button>
57+
</Col>
58+
<Col span={6} offset={0}>
59+
<Button type="primary">
60+
<EditOutlined /> Edit
61+
</Button>{' '}
62+
<Button danger>
63+
<DeleteOutlined /> Delete
5164
</Button>
5265
</Col>
5366
</Row>

0 commit comments

Comments
 (0)