Skip to content
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

Open
wants to merge 13 commits into
base: eunjin210
Choose a base branch
from

Conversation

eunjin210
Copy link

안녕하세요 멘토님 ! 이번주도 잘 부탁드립니다 ㅎㅎ
4주차 과제의 step 1과 step2를 진행해보았습니다.
코드에서 불필요한 내용이나 잘못된 부분이 있다면 피드백 부탁드립니다 감사합니다 !

@@ -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);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
console.log(data.pages[0].products);

/>
))}
<Link key={id} to={getDynamicPath.product(id)}
onClick={() => console.log(`Clicked product id: ${id}`)}>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
onClick={() => console.log(`Clicked product id: ${id}`)}>
>

@@ -0,0 +1,132 @@
// src/components/ProductContents.tsx

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// src/components/ProductContents.tsx


const productData: GoodsData = data.detail;
const price = productData.price.basicPrice * quantity
console.log(productData);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
console.log(productData);

<Box w="30%">
<PaymentInfo
price={price}
receiptRequestedRef={receiptRequestedRef}

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} />

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';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

불필요한 주석은 제거해주세요 ~!

@eunjin210
Copy link
Author

state 상태관리로 수정해보았습니다 ! 리뷰 감사드립니다 ㅎㅎ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants