import { fallbackImage, skeleton } from "../helpers/utils"; import LazyImage from "./LazyImage"; import PropTypes from 'prop-types'; import { useContext } from "react"; import { LoadingContext } from "../contexts/LoadingContext"; const AvatarCard = (props) => { const [loading] = useContext(LoadingContext); return (
{ (loading || !props.profile) ? (
{ skeleton({ width: 'w-full', height: 'h-full', shape: '', }) }
) : (
{ }
) }
{ (loading || !props.profile) ? ( skeleton({ width: 'w-48', height: 'h-8' }) ) : {props.profile.name} }
{ (loading || !props.profile) ? ( skeleton({ width: 'w-48', height: 'h-5' }) ) : props.profile.bio }
) } AvatarCard.propTypes = { profile: PropTypes.object } export default AvatarCard;