2021-08-09 14:36:16 +00:00
|
|
|
import React, {useEffect} from "react";
|
|
|
|
|
import { useAuth } from '../../context/AuthContext';
|
|
|
|
|
import avatar from "../../assets/img/team/avatar.png";
|
|
|
|
|
|
|
|
|
|
const JKCurrentUserAvatar = () => {
|
|
|
|
|
const { currentUser } = useAuth();
|
|
|
|
|
|
|
|
|
|
if(currentUser && currentUser.photo_url) {
|
2021-08-26 17:23:24 +00:00
|
|
|
return ( <img className="avatar avatar-xl rounded-circle mr-1" src={currentUser.photo_url} /> );
|
2021-08-09 14:36:16 +00:00
|
|
|
}else {
|
2021-08-26 17:23:24 +00:00
|
|
|
return ( <img className="avatar avatar-xl rounded-circle mr-1" src={avatar} /> );
|
2021-08-09 14:36:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default JKCurrentUserAvatar;
|