import  React       from "react";
import 	{connect} 	from "react-redux";
import  icon        from "../icon.jpg";

function AvaLogo({link}) {
	return (
	    <img src={link ? "http://localhost:3000/" + link : icon} className="ava" 
	    	style={{width:"100px",borderRadius: '50%'}}/>
	);
}

const ConnectedAvaLogo = connect((state) => ({link: state?.promise?.findUser?.payload?.data?.UserFindOne?.avatar?.url,}))(AvaLogo);

export default ConnectedAvaLogo;
