-
Notifications
You must be signed in to change notification settings - Fork 0
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
[FOLLOW] 친구 목록 및 친구 프로필 페이지 구현 #96
Conversation
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.
고생하셨습니다! 컴포넌트 내부에 폴더로 묶어서 깔끔하게 정리하면 좋을것 같아요!
import { ReactComponent as Empty } from 'assets/svg/follow/no-friend.svg'; | ||
import style from './FailToSearch.module.scss'; | ||
|
||
export default function EmptyFriend() { |
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.
EmptyFriend
컴포넌트와 FailToSearch
컴포넌트의 구조가 비슷한데 AuthDetail
컴포넌트처럼 인자로만 전달하는 방식을 사용하면 어떨까요..?
<div className={style.user__info}> | ||
<div> | ||
<span className={cn({ [style['user__info--span']]: true })}>{state.nickname}</span> | ||
<span>count</span> |
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.
이 count는 뭔지 알 수 있을까요...?
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.
아직 기능하나가 추가가 안 된상태였습니다.
count는 팔로워가 작성한 리뷰의 총 개수입니다
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.
고생하셨어요~ 문제가 있는 부분들은 없는 것 같고, UX향상으로 고려할만한 부분들을 나열해뒀으니 확인해주세요~
align-items: center; | ||
overflow: scroll; | ||
gap: 10px; | ||
width: 1067px; |
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.
위의 타이틀의 width: 1187
과 더불어서 고정 width가 불편한 것 같아요.
space-between
을 유지한 채로 100%를 두되, max-width
를 지금의 수치로 고정하는 방법은 어떨까요??
import style from './Follower.module.scss'; | ||
|
||
// 팔로우 요청 후 유저 목록을 다시 받아와 요청중 상태로 변경 | ||
const useRequestAndUpdate = () => { | ||
export const useRequestAndUpdate = () => { |
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.
Mutation
이라는 표현이 RequestAndUpdate
를 함축한다고 생각하는데 useFriendListMutation
.. 비슷한? 표현은 어떨까 의견 내봐요!
onClick={ | ||
() => (followedType === 'NONE' && request(account)) | ||
|| (followedType === 'REQUEST_RECEIVE' && requestId && accept(requestId)) | ||
|| (followedType === 'FOLLOWED' && del(account)) | ||
|| (followedType === 'REQUEST_SENT' && requestId && cancel(requestId)) | ||
} |
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.
switch문으로 이루어진 handleClick 콜백을 만들면 좀 더 깔끔할 것 같기두요??
아래 111L ~ 조건문들까지 생각하면 onClick Function과 UI로 이루어진 객체의 배열을 만들어 반복문과 객체 접근으로 표현하는건 어떨까 싶어요!
const useGetDetailReview = (placeId: string, followerId: number) => { | ||
const { data } = useInfiniteQuery( | ||
['detail', placeId], | ||
({ pageParam = '' }) => getDetailReview(followerId, placeId, pageParam), |
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.
여기에 pageParam이 반드시 undefined로 들어가는데 추후 확장을 고려한 부분일까요?
placeId, name, photos, isCheckerboard, category, | ||
}: Props) { | ||
const { isMobile } = useMediaQuery(); | ||
const { data } = useGetDetailReview(placeId, 361); |
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.
팔로워가 아닌 상황에 대해 에러가 발생하는데 해당 쿼리의 onError 콜백에 알림과 함께 이전 페이지로 되돌리는 UX라거나 할만한 부분들을 고려해볼 수 있을 것 같아요
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.
친구 목록 및 친구 프로필 페이지를 구현했습니다.
프로필은 오직 팔로워끼리만 확인할 수 있습니다.
친구 프로필 페이지의 pc 디자인이 확정되지 않아 모바일뷰를 많이 참고했습니다. 추후 수정하겠습니다.
Please check if the PR fulfills these requirements
develop
branch, not themain
branchyarn lint
Screenshot