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

[FOLLOW] 친구 목록 및 친구 프로필 페이지 구현 #96

Merged
merged 26 commits into from
Sep 18, 2023

Conversation

chaeseungyun
Copy link
Contributor

@chaeseungyun chaeseungyun commented Aug 22, 2023

친구 목록 및 친구 프로필 페이지를 구현했습니다.
프로필은 오직 팔로워끼리만 확인할 수 있습니다.
친구 프로필 페이지의 pc 디자인이 확정되지 않아 모바일뷰를 많이 참고했습니다. 추후 수정하겠습니다.

Please check if the PR fulfills these requirements

  • It's submitted to develop branch, not the main branch
  • The commit message follows our guidelines
  • There are no warning message when you run yarn lint
  • Docs updated for breaking changes

Screenshot

image
image
image
image
image

Copy link
Contributor

@kimeodml kimeodml left a comment

Choose a reason for hiding this comment

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

고생하셨습니다! 컴포넌트 내부에 폴더로 묶어서 깔끔하게 정리하면 좋을것 같아요!

src/api/follow/index.ts Outdated Show resolved Hide resolved
import { ReactComponent as Empty } from 'assets/svg/follow/no-friend.svg';
import style from './FailToSearch.module.scss';

export default function EmptyFriend() {
Copy link
Contributor

Choose a reason for hiding this comment

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

EmptyFriend 컴포넌트와 FailToSearch 컴포넌트의 구조가 비슷한데 AuthDetail 컴포넌트처럼 인자로만 전달하는 방식을 사용하면 어떨까요..?

src/pages/Follow/components/Follower.tsx Outdated Show resolved Hide resolved
src/pages/Follow/index.tsx Outdated Show resolved Hide resolved
src/pages/Follow/components/FollowProfile.tsx Outdated Show resolved Hide resolved
<div className={style.user__info}>
<div>
<span className={cn({ [style['user__info--span']]: true })}>{state.nickname}</span>
<span>count</span>
Copy link
Contributor

Choose a reason for hiding this comment

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

이 count는 뭔지 알 수 있을까요...?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

아직 기능하나가 추가가 안 된상태였습니다.
count는 팔로워가 작성한 리뷰의 총 개수입니다

src/pages/Follow/components/Follower.tsx Outdated Show resolved Hide resolved
@kimeodml kimeodml requested review from HAEROOL and haejinyun and removed request for jaewoogwak August 28, 2023 13:56
Copy link
Member

@ChoiWonBeen ChoiWonBeen left a 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;
Copy link
Member

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를 지금의 수치로 고정하는 방법은 어떨까요??

src/assets/svg/follow/search-fail.svg Outdated Show resolved Hide resolved
import style from './Follower.module.scss';

// 팔로우 요청 후 유저 목록을 다시 받아와 요청중 상태로 변경
const useRequestAndUpdate = () => {
export const useRequestAndUpdate = () => {
Copy link
Member

Choose a reason for hiding this comment

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

Mutation이라는 표현이 RequestAndUpdate를 함축한다고 생각하는데 useFriendListMutation.. 비슷한? 표현은 어떨까 의견 내봐요!

src/pages/Follow/components/Follower.tsx Outdated Show resolved Hide resolved
Comment on lines +104 to +109
onClick={
() => (followedType === 'NONE' && request(account))
|| (followedType === 'REQUEST_RECEIVE' && requestId && accept(requestId))
|| (followedType === 'FOLLOWED' && del(account))
|| (followedType === 'REQUEST_SENT' && requestId && cancel(requestId))
}
Copy link
Member

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로 이루어진 객체의 배열을 만들어 반복문과 객체 접근으로 표현하는건 어떨까 싶어요!

Comment on lines +18 to +21
const useGetDetailReview = (placeId: string, followerId: number) => {
const { data } = useInfiniteQuery(
['detail', placeId],
({ pageParam = '' }) => getDetailReview(followerId, placeId, pageParam),
Copy link
Member

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);
Copy link
Member

Choose a reason for hiding this comment

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

팔로워가 아닌 상황에 대해 에러가 발생하는데 해당 쿼리의 onError 콜백에 알림과 함께 이전 페이지로 되돌리는 UX라거나 할만한 부분들을 고려해볼 수 있을 것 같아요

@chaeseungyun chaeseungyun added the enhancement New feature or request label Sep 12, 2023
Copy link
Contributor

@kimeodml kimeodml left a comment

Choose a reason for hiding this comment

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

image
맞팔 아닌 사람 계정 들어가면 400에러 떠서 이 부분 수정해야 할것 같아요. 그거 외에는 피그마 최신 다지인으로 변경하면 괜찮을것 같습니다. 브랜치 최신화 한 후에 진행해 주세요!!!

@chaeseungyun chaeseungyun merged commit 5b84be1 into develop Sep 18, 2023
1 check passed
@chaeseungyun chaeseungyun deleted the feature/#99 branch September 18, 2023 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants