Skip to content

Commit

Permalink
✨ Feat: FollowUserInfo 경로 이동 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
nayeon-hub committed Sep 22, 2023
1 parent 85d6c73 commit 69a1af0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/pages/profile/components/FollowUser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const FollowUser = ({
image={image}
isOnline={isOnline}
email={email}
id={_id}
/>
{following && (
<FollowButton
Expand Down
11 changes: 9 additions & 2 deletions src/pages/profile/components/FollowUserInfo.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,29 @@
import { FollowUserInfoContainer } from './FollowUserInfo.style';
import { UserId, UserName } from '@components/UserText';
import { BadgeAvatar } from '@components/Avatar';
import { useNavigate } from 'react-router-dom';

interface FollowUserInfoProps {
fullName: string;
image?: string;
email: string;
isOnline: boolean;
id: string;
}

const FollowUserInfo = ({
fullName,
isOnline,
email,
image
image,
id
}: FollowUserInfoProps) => {
const navigate = useNavigate();

const handleClickInfo = () => navigate(`/profile/${id}`);

return (
<FollowUserInfoContainer>
<FollowUserInfoContainer onClick={handleClickInfo}>
<BadgeAvatar
alt={fullName}
src={image}
Expand Down

0 comments on commit 69a1af0

Please sign in to comment.