diff --git a/client/src/components/post/PostCard.tsx b/client/src/components/post/PostCard.tsx index 667f1a9..2b064b6 100644 --- a/client/src/components/post/PostCard.tsx +++ b/client/src/components/post/PostCard.tsx @@ -66,7 +66,7 @@ const PostCard = ({ ); return ( - + { const router = useRouter(); const { mutate: unfollowHandler } = useUnFollowMutation(); - + const { mutate: followHandler } = useFollowMutation(); return ( - + + {isFollowedByMe ? ( + + ) : ( + + )} {content} diff --git a/client/src/components/user/followList/FollowerList.tsx b/client/src/components/user/followList/FollowerList.tsx index 457d8d5..43061a8 100644 --- a/client/src/components/user/followList/FollowerList.tsx +++ b/client/src/components/user/followList/FollowerList.tsx @@ -19,15 +19,18 @@ const FollowerList = () => { return ( <> {data.pages.map((page) => - page.content.map(({ nickname, id, introduction, userNo }) => ( - - )) + page.content.map( + ({ nickname, id, introduction, userNo, isFollowedByMe }) => ( + + ) + ) )} {isFetchingNextPage ? ( diff --git a/client/src/components/user/followList/FollowingList.tsx b/client/src/components/user/followList/FollowingList.tsx index 7e5ab07..abe5066 100644 --- a/client/src/components/user/followList/FollowingList.tsx +++ b/client/src/components/user/followList/FollowingList.tsx @@ -19,12 +19,13 @@ const FollowingList = () => { return ( <> {data.pages.map((page) => - page.content.map(({ nickname, id, introduction, profileImgUrls, userNo }) => ( + page.content.map(({ nickname, id, introduction, profileImgUrls, userNo,isFollowedByMe }) => ( diff --git a/client/src/types/user/followingUserInterface.ts b/client/src/types/user/followingUserInterface.ts index e51e28a..95307b6 100644 --- a/client/src/types/user/followingUserInterface.ts +++ b/client/src/types/user/followingUserInterface.ts @@ -5,6 +5,7 @@ interface FollowingUserInterface { id: string; userNo: number; introduction: string; + isFollowedByMe:boolean; createdBy: number; profileImgUrls: AttachInterface[]; }