feat: implement avatar loading shimmers and restrict privacy settings visibility by user role
This commit is contained in:
@@ -39,10 +39,14 @@ function ProfessionalCard({
|
||||
<div className="bg-white rounded-[15px] overflow-hidden shadow-[0px_4px_20px_rgba(0,0,0,0.08)] h-full flex flex-col">
|
||||
{/* Image */}
|
||||
<div className="relative h-[226px] w-full overflow-hidden bg-gray-100">
|
||||
{/* Initials base layer */}
|
||||
<div className="absolute inset-0 bg-[#c4d9d4] flex items-center justify-center">
|
||||
<span className="font-bold text-[#00293d] text-[72px]">{name?.[0]?.toUpperCase() || '?'}</span>
|
||||
</div>
|
||||
{/* Shimmer while loading, initials only on error */}
|
||||
{imgError || isPlaceholder ? (
|
||||
<div className="absolute inset-0 bg-[#c4d9d4] flex items-center justify-center">
|
||||
<span className="font-bold text-[#00293d] text-[72px]">{name?.[0]?.toUpperCase() || '?'}</span>
|
||||
</div>
|
||||
) : !imgLoaded ? (
|
||||
<div className="absolute inset-0 shimmer-loading" />
|
||||
) : null}
|
||||
{!isPlaceholder && !imgError && (
|
||||
<Image
|
||||
src={imageUrl}
|
||||
|
||||
Reference in New Issue
Block a user