import React, {useEffect} from "react";
import { useAuth } from '../../context/UserAuth';
import avatar from "../../assets/img/team/avatar.png";

const JKCurrentUserAvatar = () => {
  const { currentUser } = useAuth();

  if(currentUser && currentUser.photo_url) {
    return ( <img className="avatar avatar-xl rounded-circle mr-1" src={currentUser.photo_url} /> );
  }else {
    return ( <img className="avatar avatar-xl rounded-circle mr-1" src={avatar} /> );
  }
  
}
 
export default JKCurrentUserAvatar;