-
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
[Feat] 팔로잉 취소 추가, 팔로잉 / 팔로잉 취소 시 화면 바로 반영 #158
Conversation
…hallenge_Jaeho into fix/following-status
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
…hallenge_Jaeho into fix/following-status
<div>팔로워</div> | ||
</div> | ||
<div> | ||
<Text onClick={handleFollowingClick}>{followingCount}</Text> | ||
<Text cursor="pointer" onClick={handleFollowCountClick}> |
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.
전달인자, 반환값없는 함수 호출이 오류없이 잘 작성되셨나보네요!
저번에 계진님이 코멘트 달아주셨던 부분인데 계진님 코드 보면서 수정 반영해야겠습니다..😯
// updatedAt: "2022-07-11T09:42:24.894Z" | ||
// user: "62aeb801f9b8ca611c46650b" | ||
// __v: 0 | ||
// _id: "62cbf080cf52f92bfbddb2fa" |
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.
주석은 임시로 작성해두신건가요??
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.
값 보면서 하다가 안 지웠네요 지워야 합니다!
} | ||
|
||
const FollowPageTab = ({ followingList, followersList }: Props) => { | ||
const [selectedTab, setSelectedTab] = useState(0); | ||
const FollowPageTab = ({ followingList, followerList }: Props) => { |
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.
이 부분은 내영님이랑 겹치는 건가요?
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.
앗 글쎄요... 어디가 겹친다는 말씀인 걸까요..?
📌 기능 설명
팔로잉 취소 추가, 팔로잉 / 팔로잉 취소 시 화면 바로 반영
👩💻 요구 사항과 구현 내용
기존에는 현재 사용자가 다른 사용자 페이지에 방문했을 때 팔로잉 중인지 아닌지 구분이 없었는데
isFollowing
)를 구분하고confirm
을 추가했습니다. 여기서 확인을 누르면 팔로잉 취소가 됩니다.useMutatio
을 통해 요청하는데, 요청이 성공하면(useMutation의 옵션으로 전달되는onSuccess
) 해당 페이지의followerList
라는 state의 변화를 통해 화면을 리렌더링 합니다.구현 결과