-
Notifications
You must be signed in to change notification settings - Fork 1
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
검색 기능 페이지 구현 #21
Merged
Merged
검색 기능 페이지 구현 #21
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
- 사용자 검색과 전체 검색으로 나누어서 구현했습니다.
- 입력한 keyword에 따라 전체 검색을 수행합니다. - 아직 필터를 적용하지 않았습니다.
- 예외처리로 error 메시지를 추가했습니다. - 검색바 밑에, error 메시지가 나타납니다.
- validate 함수의 리턴 타입을 수정했습니다.
- 전체 or 사용자 필터를 선택할 수 있습니다. - 선택한 필터에 맞는 데이터를 받아옵니다.
- 선택되지 않은 필터 아이템과 구분할 수 있도록, 선택된 필터 아이템의 배경색과 텍스트 색상을 수정했습니다.
- `all`은 전체 검색을 의미합니다.
- title에 [object FormData]가 들어있는 경우를 발견했습니다. - 임시 해결로 임의의 string을 설정했습니다.
- 전체 검색 결과 섹션에서 포스트 섹션에 Grid를 설정했습니다.
- 각 컴포넌트의 이름을 명시적으로 수정하여 가독성을 개선했습니다.
- 검색 결과가 없을 시, 특정 문구를 보여줍니다.
- 프로필 이미지가 없는 경우, 디폴트 사용자 이미지를 보여줍니다.
- 썸네일이 없다면, 디폴트 이미지를 보여줍니다.
- 사용자 필터를 선택했을 때도 동일하게 분기 처리되도록 수정했습니다.
- 검색 페이지에 최초 진입 시, 검색 결과가 없다는 문구가 렌더링되지 않도록 수정했습니다.
Open
3 tasks
JuJangGwon
requested changes
Jan 4, 2024
JuJangGwon
approved these changes
Jan 5, 2024
lja0395
approved these changes
Jan 5, 2024
Yoonkyoungme
suggested changes
Jan 5, 2024
Comment on lines
+34
to
+63
users?.map(({ image, fullName, email }) => ( | ||
<FilteredUser | ||
image={image} | ||
fullName={fullName} | ||
email={email} | ||
/> | ||
))} | ||
{type === 'all' && ( | ||
<> | ||
<HorizontalSlide> | ||
{users?.map(({ image, fullName, email }) => ( | ||
<FilteredUser | ||
image={image} | ||
fullName={fullName} | ||
email={email} | ||
isHidden | ||
/> | ||
))} | ||
</HorizontalSlide> | ||
{users!.length > 0 || | ||
(posts!.length > 0 && ( | ||
<GridPostSection> | ||
{posts?.map(({ image, title, comments, likes }) => ( | ||
<FilteredPost | ||
thumbnail={image} | ||
title={title} | ||
commentsNum={comments.length} | ||
likesNum={likes.length} | ||
/> | ||
))} |
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.
P3
users?.map 및 posts?.map에서 컴포넌트에 고유한 key 값을 사용하면 좋을 것 같아요!
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.
관련 이슈
작업 내용
2024-01-04.10.46.40.mov
특이 사항
리뷰 요구사항 (선택)