장바구니에서 결제로 이동
const letOrder = () => {
fetch(`http://10.58.0.74:8000/orders/order`, {
method: 'POST',
headers: { Authorization: localStorage.getItem('jwt') },
})
.then(response => response.json())
.then(() => {
setItem([]);
});
};
제품 삭제
const removeBag = id => {
fetch(`http://10.58.7.133:8000/carts/cart/${cart_id}`, {
method: 'DELETE',
headers: { Authorization: localStorage.getItem('jwt') },
})
.then(response => response.json())
.then(data => setItem(data.carts));
};
주문리스트 불러오기
fetch('http://10.58.0.74:8000/orders/order', {
method: 'GET',
headers: { Authorization: localStorage.getItem('jwt') },
})
.then(response => response.json())
.then(data => setItem(data));
},