'use client'; import * as AvatarPrimitive from '@radix-ui/react-avatar'; import { User } from 'lucide-react'; import { cn } from '@/lib/utils'; import { AvatarImage } from '@/components/ui/avatar'; import { type ComponentProps } from 'react'; type BasedAvatarProps = ComponentProps & { src?: string | null; fullName?: string | null; imageProps?: Omit, 'data-slot'>; fallbackProps?: ComponentProps; userIconProps?: ComponentProps; }; const BasedAvatar = ({ src = null, fullName = null, imageProps, fallbackProps, userIconProps = { size: 32, }, className, ...props }: BasedAvatarProps) => { return ( {src ? ( ) : ( {fullName ? ( fullName .split(' ') .map((n) => n[0]) .join('') .toUpperCase() ) : ( )} )} ); }; export { BasedAvatar };