The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Rocket.Chat/client/components/basic/avatar/BaseAvatar.js

14 lines
335 B

import React, { useState } from 'react';
import { Avatar, Skeleton } from '@rocket.chat/fuselage';
function BaseAvatar(props) {
const [error, setError] = useState(false);
if (error) {
return <Skeleton variant='rect' {...props} />;
}
return <Avatar onError={setError} loading='lazy' {...props}/>;
}
export default BaseAvatar;