-
Notifications
You must be signed in to change notification settings - Fork 47
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
전남대 FE 이은진 4주차 과제 STEP2 #78
base: eunjin210
Are you sure you want to change the base?
전남대 FE 이은진 4주차 과제 STEP2 #78
Conversation
@@ -27,7 +29,7 @@ export const ThemeGoodsSection = ({ themeKey }: Props) => { | |||
if (isError) return <TextView>에러가 발생했습니다.</TextView>; | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
onClick={() => console.log(`Clicked product id: ${id}`)}> | |
> |
@@ -0,0 +1,132 @@ | |||
// src/components/ProductContents.tsx |
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.
// 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console.log(productData); |
src/pages/order/index.tsx
Outdated
<Box w="30%"> | ||
<PaymentInfo | ||
price={price} | ||
receiptRequestedRef={receiptRequestedRef} |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
여기도 ref 로 값을 가져오는 것 보다 state 로 넘기게끔 수정 해보는게 좋을거 같습니다.
@@ -0,0 +1,33 @@ | |||
// import { forwardRef, ForwardedRef } 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.
불필요한 주석은 제거해주세요 ~!
state 상태관리로 수정해보았습니다 ! 리뷰 감사드립니다 ㅎㅎ |
안녕하세요 멘토님 ! 이번주도 잘 부탁드립니다 ㅎㅎ
4주차 과제의 step 1과 step2를 진행해보았습니다.
코드에서 불필요한 내용이나 잘못된 부분이 있다면 피드백 부탁드립니다 감사합니다 !