sdy

add avatar prop condition

...@@ -15,6 +15,9 @@ const ProfileIcon = styled.img` ...@@ -15,6 +15,9 @@ const ProfileIcon = styled.img`
15 `; 15 `;
16 16
17 export default ({ avatar }) => { 17 export default ({ avatar }) => {
18 + if (avatar === "") {
19 + avatar = "../imgs/defaultProfile.jpg";
20 + }
18 return ( 21 return (
19 <ProfileIconBox className="ProfileIconBox"> 22 <ProfileIconBox className="ProfileIconBox">
20 <ProfileIcon src={avatar} /> 23 <ProfileIcon src={avatar} />
......