import React from "react";
import { AvatarWrapper } from "./styled";

export interface IAvatar {
  alt: string;
  src?: string;
}
const Avatar: React.FC<IAvatar> = ({ alt, src }) => {
  return (
    <AvatarWrapper src={src}>
      <div>{!src && <p>{alt[0]}</p>}</div>
    </AvatarWrapper>
  );
};

export default Avatar;
