Commit 1e7f2bab authored by Jiwon Yoon's avatar Jiwon Yoon
Browse files

ppt주문완료까지

parent b4557a68
......@@ -314,7 +314,7 @@ function Payment({ match, location }) {
{paymentWay}
</div>
<div className="text-center">
<Button type="button" onClick={paymentCompleted} className="px-5" style={{ background: "#91877F", borderColor: '#91877F' }} block>결제완료</Button>
<Button type="button" onClick={paymentCompleted} className="px-5" style={{ background: "#91877F", borderColor: '#91877F' }} block>주문하기</Button>
</div>
</Container>
)
......
......@@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react';
import axios from 'axios';
import { isAuthenticated } from '../utils/auth';
import catchErrors from '../utils/catchErrors';
import { Card, Row, Col, Button } from 'react-bootstrap';
import { Card, Row, Col, Button, Container } from 'react-bootstrap';
function PaymentCompleted() {
const user = isAuthenticated()
......@@ -30,7 +30,7 @@ function PaymentCompleted() {
}
return (
<div>
<Container>
<div className="mx-3 my-5 text-center px-3 py-4 border">
<div className="mb-1">
<h5 className=" font-weight-bold" style={{ display: 'inline' }}>고객님의 </h5>
......@@ -84,7 +84,7 @@ function PaymentCompleted() {
<Button href="/" className="mx-1" style={{ background: "#91877F", borderColor: '#91877F', width: "7rem" }}>홈으로</Button>
<Button href="/account" className="mx-1" style={{ background: "#91877F", borderColor: '#91877F', width: "7rem" }}>마이페이지</Button>
</div>
</div>
</Container>
)
}
......
......@@ -97,38 +97,13 @@ function ProductsList({ match }) {
}
async function handleSort(method) {
// const response = await axios.get(`/api/product/sortingproduct/sub?subname=${}&page=${currentPage}&sorting=${method}`)
if (method === "purchase") {
productlist.sort(function (a, b) {
if (a.purchase > b.purchase) {
return -1;
}
if (a.purchase < b.purchase) {
return 1;
}
return 0;
});
setSortingName("인기상품")
} else if (method === "newest") {
productlist.sort(function (a, b) {
if (a.createdAt > b.createdAt) {
return -1;
}
if (a.createdAt < b.createdAt) {
return 1;
}
return 0;
});
setSortingName("신상품")
} else if (method === "lowest") {
productlist.sort(function (a, b) {
if (a.price > b.price) {
return 1;
}
if (a.price < b.price) {
return -1;
}
return 0;
});
setSortingName("낮은가격")
} else {
productlist.sort(function (a, b) {
......
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