-
Notifications
You must be signed in to change notification settings - Fork 28
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
[PR] 메인페이지 컴포넌트 작성 #98
Merged
Merged
Conversation
This file contains 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
- 메인페이지에서 사용되는 큰 배너 - 이미지를 props로 받을 생각이지만, 정적 파일을 주입할 듯
- 기존에 a태그로 감싸진 것을 Link 태그로 변경 - 스타일링 조정 - 그림자 색 조정 - 패딩값을 카드 전체가 아닌 이미지를 제외한 내용에만 적용
- 그리드 형식으로 구현 - Mock 데이터로 구현
- 데이터를 Page 레벨에서 주입하도록 수정
- 라우팅 추가 - 현재는 Mock Data로만 구성, 추후에 API 연결 - 반응형 최소로 대응
- 브런치 병합하는 과정에서 컴포넌트가 이름이 변함에 따라 관련 컴포넌트 수정
client 에서 cors policy 관련 오류가 나서 임시적으로 허용해 줌
- 아직 타입 파일에 대한 컨벤션이 없기 때문에 임의로 설정
- 카드가 보였을 때 이미지 주입 - 추후 이미지 로딩이 걸린 이미지 컴포넌트 제작 예정
- 필요하지만 안쓰는 변수를 _ 로 설정했는데 돌파구 발견
- lazy loading을 위해서 임시 div 생성 - 타입을 외부에서 주입
- intersectionObserver를 사용하기 위한 커스텀 훅 제작
- 리팩토링 매우 필요 - 코드에 대한 이해 필요 - 테스트 코드 필요
- 카드에 대한 타입이 name으로 돼있어서 title로 수정 - 글씨 크기 변화에 따른 최대 글자 길이 수정
- jest를 돌릴 때 intersectionObserver를 찾지 못함 - 따라서 intersectionObserver에 대한 polyfill 추가
- 병합하는 과정에서 중복된 로직이 지워지지 않음
- 기존에 axios 모듈을 따로 만들어서 쓰고 있었는데 useFetch를 도입하기 전에 러프하게 대체
FullOfOrange
approved these changes
Nov 29, 2019
doong-jo
approved these changes
Nov 29, 2019
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.
SignUp을 참고하여 상태를 분리해주세요 :)
- 계속해서 리렌더링되는 문제를 임시로 수정해봄
- id -> startAt
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.
관련 이슈
#60 MainPage Component
변경 사항 및 이유
PR Point
참고 사항
테스트에 대한 코드가 아직 없습니다.
추후에 fetch를 통해서 상태가 정상적으로 변하는 지에 대한 테스트 코드 작성 예정입니다.