Fix blank avatar on Safari
This commit is contained in:
parent
dcc43ff436
commit
684a4cb19a
1 changed files with 1 additions and 1 deletions
|
@ -35,7 +35,7 @@ interface IProps {
|
||||||
const Avatar: React.FC<IProps> = ({ className, avatarUrl, label }: IProps) => {
|
const Avatar: React.FC<IProps> = ({ className, avatarUrl, label }: IProps) => {
|
||||||
const [src, setSrc] = useState(avatarUrl);
|
const [src, setSrc] = useState(avatarUrl);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setSrc(avatarUrl);
|
setSrc(avatarUrl ? avatarUrl : logo);
|
||||||
}, [avatarUrl]);
|
}, [avatarUrl]);
|
||||||
|
|
||||||
const _className = classNames('avatar', className, {
|
const _className = classNames('avatar', className, {
|
||||||
|
|
Loading…
Reference in a new issue