Commit e6b07325 authored by kusang96's avatar kusang96
Browse files

Merge remote-tracking branch 'origin/sangho' into ourMaster

parents d5d8b7c2 0208334c
...@@ -16,10 +16,14 @@ function MainNav() { ...@@ -16,10 +16,14 @@ function MainNav() {
{user ? {user ?
<> <>
<Nav.Link className="text-light" onClick={() => handleLogout()}>Logout</Nav.Link> <Nav.Link className="text-light" onClick={() => handleLogout()}>Logout</Nav.Link>
<Nav.Link className="text-light" href="/account"> Mypage </Nav.Link> {admin ?
<Nav.Link href="/shoppingcart"> ''
<img alt="카트" src="/icon/cart.svg" width="30" height="30" /> : (
</Nav.Link> <Nav.Link className="text-light" href="/account"> Mypage </Nav.Link>,
<Nav.Link href="/shoppingcart">
<img alt="카트" src="/icon/cart.svg" width="30" height="30" />
</Nav.Link>
)}
</> </>
: ( : (
<> <>
......
...@@ -19,25 +19,29 @@ function OrderCard(props) { ...@@ -19,25 +19,29 @@ function OrderCard(props) {
<Card.Header className="font-weight-bold mb-3 text-center" style={{ background: '#F7F3F3' }}> <Card.Header className="font-weight-bold mb-3 text-center" style={{ background: '#F7F3F3' }}>
{e.products[0].productId.pro_name} {e.products[0].productId.pro_name}
</Card.Header>)} </Card.Header>)}
<Col> <Card.Text>
<Row> <Col>
<Card.Text> 주문번호 : <strong>{e._id}</strong> </Card.Text> <Row className=''>
</Row> <Col sm={4} xs={4} className='p-1'>주문번호 :</Col>
<Row> <Col sm={8} xs={8} className='p-1'><strong>{e._id}</strong></Col>
<Card.Text> 결제금액 : <strong>{e.total}</strong> </Card.Text>
</Row> <Col sm={4} xs={4} className='p-1'>결제금액 :</Col>
<Row> <Col sm={8} xs={8} className='p-1'><strong>{e.total}</strong></Col>
<Card.Text> 배송지 : <strong> {e.receiverInfo.address} - {e.receiverInfo.address2}</strong> </Card.Text>
</Row> <Col sm={4} xs={4} className='p-1'>배송지 :</Col>
<Row> <Col sm={8} xs={8} className='p-1'><strong> {e.receiverInfo.address} / </strong><strong><small> {e.receiverInfo.address2}</small></strong></Col>
<Card.Text> 주문날짜 : <strong> {e.createdAt.substring(0, 10)}</strong> </Card.Text>
</Row> <Col sm={4} xs={4} className='p-1'>주문날짜 :</Col>
</Col> <Col sm={8} xs={8} className='p-1'><strong>{e.createdAt.substring(0, 10)}</strong></Col>
</Row>
</Col>
</Card.Text>
</Card.Body> </Card.Body>
) )
) )
} }
</Card> </Card>
) )
} }
......
...@@ -180,9 +180,9 @@ function Account() { ...@@ -180,9 +180,9 @@ function Account() {
</Col> </Col>
</Row> </Row>
</Card> </Card>
<Card> <div className='m-2 mb-5'>
<OrderCard ordered={ordered} /> <OrderCard ordered={ordered} />
</Card> </div>
</Container > </Container >
) )
} }
......
...@@ -18,7 +18,6 @@ function Product({ match, location }) { ...@@ -18,7 +18,6 @@ function Product({ match, location }) {
let history = useHistory(); let history = useHistory();
const handleClose = () => setShow(false); const handleClose = () => setShow(false);
const handleShow = () => setShow(true); const handleShow = () => setShow(true);
const replace = product.description.replaceAll('{\n\n}', '<br />')
useEffect(() => { useEffect(() => {
if (size && color) { if (size && color) {
...@@ -230,12 +229,12 @@ function Product({ match, location }) { ...@@ -230,12 +229,12 @@ function Product({ match, location }) {
{product.name} {product.name}
</div> </div>
<Image src={`/images/${product.main_img}`} className='d-flex justify-content-center p-4' style={{ objectFit: "contain", maxWidth: "100%", margin: 'auto' }} /> <Image src={`/images/${product.main_img}`} className='d-flex justify-content-center p-4' style={{ objectFit: "contain", maxWidth: "100%", margin: 'auto' }} />
<Card style={{ width: '70%', margin: 'auto' }} className='my-4' > <Card style={{ width: '80%', margin: 'auto' }} className='my-4' >
<Card.Header className='text-center' style={{ background: '#CDC5C2' }}> <Card.Header className='text-center' style={{ background: '#CDC5C2' }}>
<h5 className='m-0' style={{ whiteSpace: 'nowrap' }}> [ Description ]</h5> <h5 className='m-0' style={{ whiteSpace: 'nowrap' }}> [ Description ]</h5>
</Card.Header> </Card.Header>
<Card.Body className='text-center m-4' style={{ whiteSpace: "pre-line", background: '#F7F3F3', fontSize: '1vw' }}> <Card.Body className='text-center m-2' style={{ whiteSpace: "pre-line", background: '#F7F3F3', fontSize: '1vw' }}>
<small>{replace}</small> <small>{product.description}</small>
</Card.Body> </Card.Body>
</Card> </Card>
<Col className='p-5'> <Col className='p-5'>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment