sdy

add DefaultIcon link

import React from "react";
import styled from "styled-components";
import DefaultIcon from "../imgs/defaultProfile.jpg";
const ProfileIconBox = styled.div`
display: flex;
......@@ -16,11 +17,11 @@ const ProfileIcon = styled.img`
export default ({ avatar }) => {
if (avatar === "") {
avatar = "../imgs/defaultProfile.jpg";
console.log("avatar link is empty");
}
return (
<ProfileIconBox className="ProfileIconBox">
<ProfileIcon src={avatar} />
<ProfileIcon src={DefaultIcon} />
</ProfileIconBox>
);
};
......