ProfileIcon.js 607 Bytes
import React from "react";
import styled from "styled-components";
import DefaultIcon from "../imgs/defaultProfile.jpg";

const ProfileIconBox = styled.div`
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
`;

const ProfileIcon = styled.img`
  width: 50px;
  border-radius: 20px;
  src: ${(props) => props.theme.defaultProfile};
`;

export default ({ avatar }) => {
  if (avatar === "") {
    console.log("avatar link is empty");
  }
  return (
    <ProfileIconBox className="ProfileIconBox">
      <ProfileIcon src={DefaultIcon} />
    </ProfileIconBox>
  );
};