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

[#20] 추천 메인 페이지 제작 (미완) #53

Merged
merged 6 commits into from
Jul 31, 2022
Merged

[#20] 추천 메인 페이지 제작 (미완) #53

merged 6 commits into from
Jul 31, 2022

Conversation

ShinJongUng
Copy link
Member

@ShinJongUng ShinJongUng commented Jul 31, 2022

Summary

  • ScrollView 밑에 FlatList가 들어갈 수 없는 구조이기 때문에, 기존의 FlatList로 구현되었던 RecommendPreviewFourCard를 map function으로 교체하였습니다.
  • 추천 헤더바를 제작하였습니다.
  • testData를 삽입하였습니다.

Comments

  • testData를 뺄까요? 최상위 페이지까지 가져와야하는건 맞는거 같은데.. ㅎㅎ
  • marginLeft를 음수로 해야하는 문제가 있습니다. issue 참고해주세요
  • 스크린 구조확인해주세요

image

…onent (#20)

추천페이지 헤더 디자인 추가 & 기본적인 스크롤 뷰 스타일 제작

#20
…tion) (#20)

RecommendPreviewFourCard 컴포넌트 상위 컴포넌트가 ScrollView이기 때문에 에러 발생 방지를 위해 map 함수로 교체

#20
…ganism (#20)

기본스크롤뷰 컴포넌트, RecommendPreviewCardsOrganism 제작

#20
@ShinJongUng ShinJongUng added the feature ✨ feature label label Jul 31, 2022
@ShinJongUng ShinJongUng requested a review from vgihan July 31, 2022 09:19
@ShinJongUng ShinJongUng self-assigned this Jul 31, 2022
};

const RecommendPreviewCardsOrganism = ({children, data}: PropsWithChildren & Props) => {
return (
Copy link
Collaborator

Choose a reason for hiding this comment

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

데이터를 여기서 받으면 좋을 것 같아요 !

<SubHeadline2>{children}</SubHeadline2>
</TitleWrapper>
<RecommendPreviewFourCard data={data} />
<ButtonWrapper>
Copy link
Collaborator

Choose a reason for hiding this comment

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

지금 data 라는 props가 organism 컴포넌트에서는 아무 작업도 없고 그저 RecommendPreviewFourCard 컴포넌트로 데이터를 내려주고만 있어서 Props drilling이 발생하는데, organism 레벨에서 데이터 fetch 받으면 안되는 이유가 따로 있을까요??

Copy link
Member Author

Choose a reason for hiding this comment

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

그런 이유는 없는데.. organism 레벨에서 데이터를 어떤식으로 fetch 받나요?

Copy link
Member Author

Choose a reason for hiding this comment

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

각 컴포넌트마다 다르게 받아와야하는데 그걸 어떻게 해야하냐는 질문이였습니다.. ㅋㅋㅋ,,,

Copy link
Collaborator

Choose a reason for hiding this comment

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

서로 다른 organism을 만들어야 할 것 같아요

Copy link
Member Author

Choose a reason for hiding this comment

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

그런 좋은 방법이...!
근데 이건 제가 개인적으로 궁금한건데 이렇게 component 많아져도 되는거죠..? 한페이지 만드는데 ㅋㅋㅋㅋ

Copy link
Collaborator

Choose a reason for hiding this comment

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

Card 4개 뷰는 다른 곳에도 재사용할거라 괜찮을 것 같아요 !

{/*여기 검색창 추가 됩니다.*/}
<RecommendPreviewCardsOrganism data={TestData}>요즘 뜨는 포즈!</RecommendPreviewCardsOrganism>
<RecommendPreviewCardsOrganism data={TestData}>
이벤트 프레임 추천
Copy link
Collaborator

Choose a reason for hiding this comment

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

위 방법 대로 라면 data를 props로 넘겨주지 않을 수 있을 것 같슴다

Copy link
Member Author

Choose a reason for hiding this comment

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

이렇게 두개 분리하면 될까요? 수정해봤습니다

props 드릴링이 생기는 RecommendPage를 수정

#20
api 요청을 Organism 단위에서 받기 위해 분리하여 제작

#20
Copy link
Collaborator

@vgihan vgihan left a comment

Choose a reason for hiding this comment

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

좋습니다 !!

@vgihan vgihan merged commit a928a8b into develop Jul 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature ✨ feature label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants