"use client"; import clsx from "clsx"; import Image from "next/image"; import React, { useState } from "react"; interface IBlurImage { height?: any; width?: any; src?: string | any; objectFit?: any; className?: string | any; alt?: string | undefined; layout?: any; [x: string]: any; } export const BlurImage = ({ height, width, src, className, _objectFit, alt, layout, ...rest }: IBlurImage) => { const [isLoading, setLoading] = useState(true); return ( setLoading(false)} src={src} width={width} height={height} loading="lazy" decoding="async" blurDataURL={src} layout={layout} alt={alt ? alt : "Avatar"} {...rest} /> ); };