From bbb1da4c43475fe9bc370f9ea27b85b88ee8db32 Mon Sep 17 00:00:00 2001 From: brian <90752841+wokbjso@users.noreply.github.com> Date: Tue, 26 Nov 2024 21:48:46 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20=EC=BD=94=EB=93=9C=20=EB=A6=AC?= =?UTF-8?q?=EB=B7=B0=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../molecules/recommended-profile-card.tsx | 29 +++++-------------- .../molecules/recommended-profile-item.tsx | 8 ++--- 2 files changed, 10 insertions(+), 27 deletions(-) diff --git a/features/profile-recommend/components/molecules/recommended-profile-card.tsx b/features/profile-recommend/components/molecules/recommended-profile-card.tsx index 775351c9..164076cd 100644 --- a/features/profile-recommend/components/molecules/recommended-profile-card.tsx +++ b/features/profile-recommend/components/molecules/recommended-profile-card.tsx @@ -51,27 +51,14 @@ export function RecommendedProfileCard({
{!isMyProfile && ( - <> - {isFollowing ? ( -
diff --git a/features/profile-recommend/components/molecules/recommended-profile-item.tsx b/features/profile-recommend/components/molecules/recommended-profile-item.tsx index e8da4c1a..25d8f0c5 100644 --- a/features/profile-recommend/components/molecules/recommended-profile-item.tsx +++ b/features/profile-recommend/components/molecules/recommended-profile-item.tsx @@ -12,11 +12,7 @@ export function RecommendedProfileItem({ const { data: myData } = useCurrentMemberInfo(); const { data: profileData } = useProfileData(memberId); - const getIsMyProfile = (memberId: number) => { - if (!myData?.data) return false; - const myMemberId = myData?.data.id; - return myMemberId === memberId; - }; + const getIsMyProfile = myData?.data?.id === memberId; if (!profileData) return null; return ( @@ -25,7 +21,7 @@ export function RecommendedProfileItem({ nickname={profileData?.nickname} introduction={profileData?.introduction} profileImageUrl={profileData.profileImageUrl} - isMyProfile={getIsMyProfile(memberId)} + isMyProfile={getIsMyProfile} /> ); }