Admin.js 6.3 KB
Newer Older
Kim, Subin's avatar
Kim, Subin committed
1
import React, { useState, useEffect, useRef } from 'react';
Kim, Subin's avatar
Kim, Subin committed
2
3
import MainNav from '../Components/MainNav';
import SubNav from '../Components/SubNav';
Kim, Subin's avatar
Kim, Subin committed
4
5
import Pagination from '../Components/Pagination';
import search from '../search.svg';
Jiwon Yoon's avatar
Jiwon Yoon committed
6
import { Row, Col, Form, FormControl, Button, Card, Container } from 'react-bootstrap';
Kim, Subin's avatar
Kim, Subin committed
7
8

function Admin() {
9
10
11
12
13
    function handleClick(e) {
        const card = e.target.parentNode.parentNode
        console.log(card)
        alert('해당 상품을 성공적으로 삭제하였습니다.')
    }
Kim, Subin's avatar
Kim, Subin committed
14
15
16

    return (
        <div>
17
18
19
20
21
22
23
24
25
26
27
28
29
            <style type="text/css">
                {`
                .btn {
                    background-color: #CDC5C2;
                    border-color: #CDC5C2;
                }

                .btn:hover, .btn:active, .btn:focus {
                    background-color: #91877F;
                    border-color: #91877F;
                }
                `}
            </style>
Kim, Subin's avatar
Kim, Subin committed
30
31
            <MainNav />
            <SubNav />
Jiwon Yoon's avatar
Jiwon Yoon committed
32
33
34
            <Container>
            <Row className="justify-content-end mt-5 mb-5">
                    <FormControl type="text" placeholder="Search" style={{width:"13rem"}} />
35
                    <Button type="submit" className="px-2">
36
                        <img src={search} width="20" height="20" />
Kim, Subin's avatar
Kim, Subin committed
37
                    </Button>
Jiwon Yoon's avatar
Jiwon Yoon committed
38
                    <Button sm={2} xs={6} type="button" href="/regist" className="ml-1">상품 등록</Button>
Kim, Subin's avatar
Kim, Subin committed
39
            </Row>
40
            <Row className="justify-content-start m-5">
Jiwon Yoon's avatar
Jiwon Yoon committed
41
                <Card className="my-5" style={{ width: "18rem", margin: "auto" }}>
42
                    <Card.Img variant="top" src="https://img.sonyunara.com/files/goods/67460/1607053816_0.jpg" style={{ objectFit: "contain", height: "22rem" }} />
Kim, Subin's avatar
Kim, Subin committed
43
                    <Card.Body>
44
                        <Card.Title>케이시앵글부츠(SH)</Card.Title>
Kim, Subin's avatar
Kim, Subin committed
45
                        <Card.Text>
46
                            재고: 8<br />
47
                            구매자 : 10
48
49
                        </Card.Text>
                        <Button className="float-right" onClick={(e) => handleClick(e)}>삭제</Button>
Kim, Subin's avatar
Kim, Subin committed
50
51
                    </Card.Body>
                </Card>
Jiwon Yoon's avatar
Jiwon Yoon committed
52
                <Card className="my-5" style={{ width: "18rem", margin: "auto" }}>
53
                    <Card.Img variant="top" src="https://img.sonyunara.com/files/goods/48705/1552562469_0.jpg" style={{ objectFit: "contain", height: "22rem" }} />
Kim, Subin's avatar
Kim, Subin committed
54
                    <Card.Body>
55
                        <Card.Title>메리제인플랫(SH)</Card.Title>
Kim, Subin's avatar
Kim, Subin committed
56
                        <Card.Text>
57
                            재고: 20<br />
58
                            구매자 : 60
59
60
                        </Card.Text>
                        <Button className="float-right" onClick={(e) => handleClick(e)}>삭제</Button>
Kim, Subin's avatar
Kim, Subin committed
61
62
                    </Card.Body>
                </Card>
Jiwon Yoon's avatar
Jiwon Yoon committed
63
                <Card className="my-5" style={{ width: "18rem", margin: "auto" }}>
64
                    <Card.Img variant="top" src="https://img.sonyunara.com/files/goods/53386/1567390097_2.jpg" style={{ objectFit: "contain", height: "22rem" }} />
Kim, Subin's avatar
Kim, Subin committed
65
                    <Card.Body>
66
                        <Card.Title>솔티드스니커즈(SH)</Card.Title>
Kim, Subin's avatar
Kim, Subin committed
67
                        <Card.Text>
68
                            재고: 34<br />
69
                            구매자 : 5
70
71
                        </Card.Text>
                        <Button className="float-right" onClick={(e) => handleClick(e)}>삭제</Button>
Kim, Subin's avatar
Kim, Subin committed
72
73
                    </Card.Body>
                </Card>
Jiwon Yoon's avatar
Jiwon Yoon committed
74
                <Card className="my-5" style={{ width: "18rem", margin: "auto" }}>
75
                    <Card.Img variant="top" src="https://img.sonyunara.com/files/goods/61286/1587540563_0.jpg" style={{ objectFit: "contain", height: "22rem" }} />
Kim, Subin's avatar
Kim, Subin committed
76
                    <Card.Body>
77
                        <Card.Title>버켄슬리퍼(SH)</Card.Title>
Kim, Subin's avatar
Kim, Subin committed
78
                        <Card.Text>
79
80
81
82
                            재고: 50<br />
                            구매자 : 18
                        </Card.Text>
                        <Button className="float-right" onClick={(e) => handleClick(e)}>삭제</Button>
Kim, Subin's avatar
Kim, Subin committed
83
84
                    </Card.Body>
                </Card>
Jiwon Yoon's avatar
Jiwon Yoon committed
85
                <Card className="my-5" style={{ width: "18rem", margin: "auto" }}>
86
                    <Card.Img variant="top" src="https://hotping.co.kr/web/product/big/202011/b8f4c6471955b80fc3991b7d6df8926a.jpg" style={{ objectFit: "contain", height: "22rem" }} />
Kim, Subin's avatar
Kim, Subin committed
87
                    <Card.Body>
88
                        <Card.Title>크레센도 하이힐펌프스</Card.Title>
Kim, Subin's avatar
Kim, Subin committed
89
                        <Card.Text>
90
                            재고: 35<br />
91
                            구매자 : 70
92
93
                        </Card.Text>
                        <Button className="float-right" onClick={(e) => handleClick(e)}>삭제</Button>
Kim, Subin's avatar
Kim, Subin committed
94
95
                    </Card.Body>
                </Card>
Jiwon Yoon's avatar
Jiwon Yoon committed
96
                <Card className="my-5" style={{ width: "18rem", margin: "auto" }}>
97
                    <Card.Img variant="top" src="https://hotping.co.kr/web/product/big/202011/888e4e8d6a2c2e7da385b079151fcba2.jpg" style={{ objectFit: "contain", height: "22rem" }} />
Kim, Subin's avatar
Kim, Subin committed
98
                    <Card.Body>
99
                        <Card.Title>어텀솔져1cm 스웨이드로퍼</Card.Title>
Kim, Subin's avatar
Kim, Subin committed
100
                        <Card.Text>
101
                            재고: 40<br />
102
                            구매자 : 30
103
104
                        </Card.Text>
                        <Button className="float-right" onClick={(e) => handleClick(e)}>삭제</Button>
Kim, Subin's avatar
Kim, Subin committed
105
106
                    </Card.Body>
                </Card>
Jiwon Yoon's avatar
Jiwon Yoon committed
107
                <Card className="my-5" style={{ width: "18rem", margin: "auto" }}>
108
                    <Card.Img variant="top" src="https://hotping.co.kr/web/product/big/202007/3308564012eb14e6c11ed621fa7555fb.jpg" style={{ objectFit: "contain", height: "22rem" }} />
Kim, Subin's avatar
Kim, Subin committed
109
                    <Card.Body>
110
                        <Card.Title>포웰3.5cm 스니커즈</Card.Title>
Kim, Subin's avatar
Kim, Subin committed
111
                        <Card.Text>
112
                            재고: 15<br />
113
                            구매자 : 50
114
115
                        </Card.Text>
                        <Button className="float-right" onClick={(e) => handleClick(e)}>삭제</Button>
Kim, Subin's avatar
Kim, Subin committed
116
117
118
119
                    </Card.Body>
                </Card>
            </Row>
            <Pagination />
Jiwon Yoon's avatar
Jiwon Yoon committed
120
            </Container>
Kim, Subin's avatar
Kim, Subin committed
121
        </div>
Kim, Subin's avatar
Kim, Subin committed
122

Kim, Subin's avatar
Kim, Subin committed
123
124
125
126
    )
}

export default Admin