-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[KM-191] 수정:주문서 , 장바구니 페이지에 axios 적용 및 코드 수정 #68
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
프론트 하시느라 고생이 많으셔요 ㅠㅠ 이번주만 아좌조ㅓ
간단한 리뷰 남겨두렸으니 한번 참고해보세요!!
아 그리구 api가 한 곳에 몰려있으면 뭔가 view와 logic을 분리할 수도 있는데 이거는 사실 프론트라 무시하셔도 됩니다 ㅋㅋㅎ😜
body: JSON.stringify(cart), | ||
}); | ||
return { ...cart, quantity: cart.quantity + 1 }; | ||
const increaseQuantity = (cartId) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아 요렇개 구현하셨군요! 👍
ApiController 측에 있는 JwtInterceptor를 사용하시면 자동으로 저장된 토큰을 헤더에 넣어줄거랍니다! 한번 제 코드 참고해보시면 좋을 것 같아요!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a52a124 피드백 반영
- jwt 인터셉터를 적용해보았습니다 !
- 근데 아직 도커 이슈 땜에 db 연동을 못해서 테스트 데이터로 처리하고 , 인터셉트는 주석으로 남겨두었습니다 ㅠ
<td>{cart.name}</td> | ||
<td>${cart.price}</td> | ||
<td> | ||
<button onClick={() => decreaseQuantity(cart.cartId, cart.productId)}>-</button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
같은 파일이라서 여기서 값을 넘겨주지 않아도 괜찮을 것 같은데 어떻게 생각하시나요?? 그러면 arrow function을 사용하지 않아도 될 것 같아요 ㅎㅎ!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
음 .. 근데 카트 데이터가 여러 개여서 해당 데이터만을 넘겨주어야 하기 때문에 일단은 저렇게 해주었습니다 !
혹시 프론트 하시다가 이상 있으시면 말씀해주세용 !
front/src/pages/Receipt.jsx
Outdated
@@ -1,54 +1,44 @@ | |||
import { useState } from 'react'; | |||
import React, {useState} from 'react'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
React는 빼도 될 것 같아용! 이제 잘 지원합니당 ㅎㅎ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
304abe8 피드백 반영
- 넵 제거 하였습니당
🔍 어떤 PR인가요?
😋 To Reviewer