Skip to content

Commit

Permalink
fix: 본인 프로필은 추천에 뜨지 않도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
wokbjso committed Nov 26, 2024
1 parent 5e1cd7d commit 80f4697
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function RecommendedProfileCard({
void toggleFollow(memberId);
};

if (!profileData) return null;
if (!profileData || isMyProfile) return null;
return (
<div className={css(ProfileCardStyle.layout.raw({ variant }))}>
<Link
Expand All @@ -50,16 +50,14 @@ export function RecommendedProfileCard({
</div>
</Link>
<div className={css(ProfileCardStyle.followButton.raw({ variant }))}>
{!isMyProfile && (
<Button
size="small"
label={isFollowing ? '팔로잉' : '팔로우'}
variant="outlined"
buttonType={isFollowing ? 'assistive' : 'primary'}
className={css({ w: 'full' })}
onClick={handleClickFollow}
/>
)}
<Button
size="small"
label={isFollowing ? '팔로잉' : '팔로우'}
variant="outlined"
buttonType={isFollowing ? 'assistive' : 'primary'}
className={css({ w: 'full' })}
onClick={handleClickFollow}
/>
</div>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@ export function RecommendedProfileItem({

const getIsMyProfile = myData?.data?.id === memberId;

if (!profileData) return null;
if (!profileData || getIsMyProfile) return null;
return (
<ProfileListItem
memberId={memberId}
nickname={profileData?.nickname}
introduction={profileData?.introduction}
profileImageUrl={profileData.profileImageUrl}
isMyProfile={getIsMyProfile}
/>
);
}

0 comments on commit 80f4697

Please sign in to comment.