Fix blank avatar on Safari

This commit is contained in:
J. Ryan Stinnett 2020-09-29 16:10:44 +01:00
parent dcc43ff436
commit 684a4cb19a

View File

@ -35,7 +35,7 @@ interface IProps {
const Avatar: React.FC<IProps> = ({ className, avatarUrl, label }: IProps) => {
const [src, setSrc] = useState(avatarUrl);
useEffect(() => {
setSrc(avatarUrl);
setSrc(avatarUrl ? avatarUrl : logo);
}, [avatarUrl]);
const _className = classNames('avatar', className, {