전남대 FE 이은진 4주차 과제 STEP2#78
Open
eunjin210 wants to merge 13 commits intokakao-tech-campus-2nd-step2:eunjin210from
Open
전남대 FE 이은진 4주차 과제 STEP2#78eunjin210 wants to merge 13 commits intokakao-tech-campus-2nd-step2:eunjin210from
eunjin210 wants to merge 13 commits intokakao-tech-campus-2nd-step2:eunjin210from
Conversation
added 12 commits
July 16, 2024 15:31
tlsehdfl
reviewed
Jul 20, 2024
| if (!data) return <></>; | ||
| if (data.pages[0].products.length <= 0) return <TextView>상품이 없어요.</TextView>; | ||
|
|
||
| console.log(data.pages[0].products); |
There was a problem hiding this comment.
Suggested change
| console.log(data.pages[0].products); |
| /> | ||
| ))} | ||
| <Link key={id} to={getDynamicPath.product(id)} | ||
| onClick={() => console.log(`Clicked product id: ${id}`)}> |
There was a problem hiding this comment.
Suggested change
| onClick={() => console.log(`Clicked product id: ${id}`)}> | |
| > |
| @@ -0,0 +1,132 @@ | |||
| // src/components/ProductContents.tsx | |||
There was a problem hiding this comment.
Suggested change
| // src/components/ProductContents.tsx |
|
|
||
| const productData: GoodsData = data.detail; | ||
| const price = productData.price.basicPrice * quantity | ||
| console.log(productData); |
There was a problem hiding this comment.
Suggested change
| console.log(productData); |
src/pages/order/index.tsx
Outdated
| <Box w="30%"> | ||
| <PaymentInfo | ||
| price={price} | ||
| receiptRequestedRef={receiptRequestedRef} |
There was a problem hiding this comment.
receiptRequestedRef, receiptNumberRef 를 넘기는 방법보다 state 로 관리하게끔 해주는건 어떨까요 ?
| <Text fontSize="lg" mb={2} textAlign="center" margin="30px" width="100%"> | ||
| 나에게 주는 선물 | ||
| </Text> | ||
| <Textarea ref={ref} borderRadius="10px" bgColor="skyblue" placeholder="선물과 함께 보낼 메시지를 적어보세요" {...props} /> |
There was a problem hiding this comment.
여기도 ref 로 값을 가져오는 것 보다 state 로 넘기게끔 수정 해보는게 좋을거 같습니다.
| @@ -0,0 +1,33 @@ | |||
| // import { forwardRef, ForwardedRef } from 'react'; | |||
Author
|
state 상태관리로 수정해보았습니다 ! 리뷰 감사드립니다 ㅎㅎ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
안녕하세요 멘토님 ! 이번주도 잘 부탁드립니다 ㅎㅎ
4주차 과제의 step 1과 step2를 진행해보았습니다.
코드에서 불필요한 내용이나 잘못된 부분이 있다면 피드백 부탁드립니다 감사합니다 !