Showing
1 changed file
with
3 additions
and
2 deletions
1 | import React from "react"; | 1 | import React from "react"; |
2 | import styled from "styled-components"; | 2 | import styled from "styled-components"; |
3 | +import DefaultIcon from "../imgs/defaultProfile.jpg"; | ||
3 | 4 | ||
4 | const ProfileIconBox = styled.div` | 5 | const ProfileIconBox = styled.div` |
5 | display: flex; | 6 | display: flex; |
... | @@ -16,11 +17,11 @@ const ProfileIcon = styled.img` | ... | @@ -16,11 +17,11 @@ const ProfileIcon = styled.img` |
16 | 17 | ||
17 | export default ({ avatar }) => { | 18 | export default ({ avatar }) => { |
18 | if (avatar === "") { | 19 | if (avatar === "") { |
19 | - avatar = "../imgs/defaultProfile.jpg"; | 20 | + console.log("avatar link is empty"); |
20 | } | 21 | } |
21 | return ( | 22 | return ( |
22 | <ProfileIconBox className="ProfileIconBox"> | 23 | <ProfileIconBox className="ProfileIconBox"> |
23 | - <ProfileIcon src={avatar} /> | 24 | + <ProfileIcon src={DefaultIcon} /> |
24 | </ProfileIconBox> | 25 | </ProfileIconBox> |
25 | ); | 26 | ); |
26 | }; | 27 | }; | ... | ... |
-
Please register or login to post a comment