Fix blank avatar on Safari
This commit is contained in:
parent
dcc43ff436
commit
684a4cb19a
@ -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 New Issue
Block a user