-
Notifications
You must be signed in to change notification settings - Fork 0
[Dev] 찜 관련 API 작업 #29
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
base: feature/api-integration-20-2
Are you sure you want to change the base?
[Dev] 찜 관련 API 작업 #29
Conversation
967fdcf to
42055f8
Compare
| console.log("좋아요!"); | ||
| // TODO: 좋아요 API 연동 | ||
|
|
||
| if (lectureData.heart === true) { |
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.
=== true, === false가 아닌 lectureData.heart / !lectureData.heart와 같이 하는게 더 괜찮을 것 같네요.
| }, | ||
| { | ||
| onSuccess: () => { | ||
| toast("좋아요 삭제 성공"); |
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.
좋아요 삭제 성공과 같은 MSG들은 constant에서 따로 상수로 정의해주세요.
SUCCESS_LIKE_MSG = ''
| })} | ||
| {lectureInfo.instructor_name.map((instructor) => { | ||
| return instructor.instructor_history.map((history, idx) => { | ||
| return <li key={idx}>{history.content}</li>; |
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.
key를 idx로 두게되면 react특성상 key값을 기준으로 판단을 하기에 정확하게 판단이 안 될 수도 있어요. 그래서 history의 특정 id값과 같은 것을 유니크 key값으로 설정해주세요
| apiRequest.post<LikeLecture["Response"]>( | ||
| `${BASE_PATH}`, | ||
| {}, | ||
| { |
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.
authorization 객체는 axios interceptor에서 공통으로 처리해주세요
#️⃣ 연관된 이슈
📝 작업 내용
스크린샷
💬 리뷰 요구사항