Skip to content

Commit

Permalink
[Fix] 프로필 이미지 공통 컴포넌트로 교체 #32
Browse files Browse the repository at this point in the history
why
props가 명확하지 않은 이름으로 만들어져있었음
재사용이 많이됨

how
공통 컴포넌트에 있는 component로 교체
  • Loading branch information
WooYeonSeo committed Nov 26, 2019
1 parent faa039d commit 7170448
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
8 changes: 6 additions & 2 deletions client/src/composition/Feed/Comment.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import styled from 'styled-components';

import Profile from '../../components/Profile';
interface ITest {
size: string;
}
Expand Down Expand Up @@ -44,7 +44,11 @@ const Comment: React.FC = () => {
<>
<CommentDiv>
<div>
<ProfileImg size="32"></ProfileImg>
<Profile
imageUrl={process.env.PUBLIC_URL + '/images/profile.jpg'}
alt={'profile image'}
size="32px"
/>
<CommentBubble>
<CommentText>댓글댓글</CommentText>
</CommentBubble>
Expand Down
11 changes: 8 additions & 3 deletions client/src/composition/Feed/FeedHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from "react";
import styled from "styled-components";
import React from 'react';
import styled from 'styled-components';
import Profile from '../../components/Profile';

const ProfileDiv = styled.div`
display: inline-block;
Expand Down Expand Up @@ -47,7 +48,11 @@ const FeedHeader = ({ createdAt }: Iprops) => {
<>
<div>
<ProfileImgBox>
<ProfileImg size="40"></ProfileImg>
<Profile
imageUrl={process.env.PUBLIC_URL + '/images/profile.jpg'}
alt={'profile image'}
size="40px"
/>
</ProfileImgBox>
<ProfileDiv>
<ProfileNameDiv>우연서</ProfileNameDiv>
Expand Down

0 comments on commit 7170448

Please sign in to comment.