Skip to content

Commit

Permalink
refactor: 내가 작성한 댓글 및 답글인 경우 프로필 영역 클릭 시 프로필 라우팅 미동작하도록 변경 (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
semnil5202 authored Apr 17, 2024
1 parent 8afa44d commit cb5b416
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
1 change: 1 addition & 0 deletions src/pages/FeedDetail/components/Comment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ const Comment = ({
nickname={nickname}
skillList={memberSkills}
createdAt={createdAt}
owner={owner}
/>
{!deleted && <ModifyDropdown owner={owner} isInComment onEdit={onEditComment} onDelete={onDeleteComment} />}
</Flex>
Expand Down
21 changes: 11 additions & 10 deletions src/pages/FeedDetail/components/CommentProfileInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,21 @@ interface Props {
nickname: string;
skillList: string[];
createdAt: string;
owner: boolean;
}

const CommentProfileInfo = ({ memberId, imageUrl, nickname, skillList, createdAt }: Props) => {
const CommentProfileInfo = ({ memberId, imageUrl, nickname, skillList, createdAt, owner }: Props) => {
const { goProfilePage } = useNavigatePage();

const onClickProfileImage = () => {
if (owner) return;

goProfilePage(memberId);
};

return (
<Flex gap={10}>
<Box
width={36}
height={36}
overflow="hidden"
borderRadius="0 150px 150px 0"
onClick={() => goProfilePage(memberId)}
cursor="pointer"
>
<Flex gap={10} onClick={onClickProfileImage} cursor={owner ? '' : 'pointer'}>
<Box width={36} height={36} overflow="hidden" borderRadius="0 150px 150px 0">
<ImageView src={imageUrl} alt="프로필" defaultSrc={PNGDefaultProfileInfo36} />
</Box>
<Flex paddingTop={2} direction="column" gap={4}>
Expand Down
1 change: 1 addition & 0 deletions src/pages/FeedDetail/components/Recomment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ const Recomment = ({
nickname={nickname}
skillList={memberSkills}
createdAt={createdAt}
owner={owner}
/>
<Spacer size={20} />
<Text font="suit14r" color="t" style={{ lineHeight: '22px', whiteSpace: 'pre-wrap' }}>
Expand Down

0 comments on commit cb5b416

Please sign in to comment.