Skip to content

Commit

Permalink
[Add] 친구리스트에 링크 추가 #242
Browse files Browse the repository at this point in the history
친구상태를 보여주는 리스트에 각 유저의 페이지로 갈 수 있는 링크를 연결하였습니다.
  • Loading branch information
beingPracticer committed Dec 22, 2019
1 parent dc461c3 commit 8946e92
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions client/src/components/User.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import React from 'react';
import { Link } from 'react-router-dom';
import styled from 'styled-components';
import Profile from './Profile';
import { PAGE_PATHS } from 'Constants';

const ProfileDiv = styled.div`
display: block;
Expand Down Expand Up @@ -53,15 +55,17 @@ interface IProps {

const User = ({ email, thumbnail, nickname, status }: IProps) => {
return (
<ProfileDiv>
<ProfileImgBox>
<Profile imageUrl={thumbnail} alt={email} size="30px" />
</ProfileImgBox>
<ProfileName>{nickname}</ProfileName>
<ProfileStatus>
<Status status={status === 'online'} />
</ProfileStatus>
</ProfileDiv>
<Link to={`${PAGE_PATHS.MY_PAGE}/${email}`}>
<ProfileDiv>
<ProfileImgBox>
<Profile imageUrl={thumbnail} alt={email} size="30px" />
</ProfileImgBox>
<ProfileName>{nickname}</ProfileName>
<ProfileStatus>
<Status status={status === 'online'} />
</ProfileStatus>
</ProfileDiv>
</Link>
);
};

Expand Down

0 comments on commit 8946e92

Please sign in to comment.