Skip to content

Commit

Permalink
fix: handWavingStatus 추가로 인한 중복 props삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeJeongHooo committed Sep 20, 2024
1 parent 73c7384 commit c615763
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export type MemberType = {
name: string;
profileImageFileUrl?: string;
role: 'OWNER' | 'ADMIN' | 'MEMBER';
isHandWaved: boolean;
isMe: boolean;
handWavingStatus: HandWavingStatusType;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interface GatherMemberProfileProps {
}

export const GatherMemberProfile = ({ meetingId, member }: GatherMemberProfileProps) => {
const { name, role, profileImageFileUrl, meetingMemberId, isHandWaved, isMe, handWavingStatus } = member;
const { name, role, profileImageFileUrl, meetingMemberId, isMe, handWavingStatus } = member;
const isOwner = role === 'OWNER';

return (
Expand All @@ -27,12 +27,7 @@ export const GatherMemberProfile = ({ meetingId, member }: GatherMemberProfilePr
>
<Link href={isMe ? '/home/me' : `${meetingId}/about/${meetingMemberId}`}>
<div css={{ alignItems: 'center', display: 'flex', flexDirection: 'column' }}>
<ProfileImage
imageUrl={profileImageFileUrl}
isConnection={isHandWaved}
isOnwer={isOwner}
handWavingStatus={handWavingStatus}
/>
<ProfileImage imageUrl={profileImageFileUrl} isOnwer={isOwner} handWavingStatus={handWavingStatus} />
<Txt typography="title2" css={{ marginTop: '12px' }}>
{isMe ? '나' : name}
</Txt>
Expand All @@ -44,13 +39,12 @@ export const GatherMemberProfile = ({ meetingId, member }: GatherMemberProfilePr

interface ProfileImageProps {
imageUrl?: string;
isConnection?: boolean;
isOnwer?: boolean;
handWavingStatus: HandWavingStatusType;
}

const ProfileImage = ({ imageUrl, isConnection = false, isOnwer = false, handWavingStatus }: ProfileImageProps) => {
const isHandWaving = isConnection || handWavingStatus === 'REQUESTED' || handWavingStatus === 'ACCEPTED';
const ProfileImage = ({ imageUrl, isOnwer = false, handWavingStatus }: ProfileImageProps) => {
const isHandWaving = handWavingStatus === 'REQUESTED' || handWavingStatus === 'ACCEPTED';

const color = handWavingStatus === 'ACCEPTED' ? colors.primary500 : colors.grey500;

Expand Down

0 comments on commit c615763

Please sign in to comment.