import NextImage from 'next/image' import { useState } from 'react' import classNames from 'classnames' /** * The `Image` component is used to display lazy-loaded images. * * @param {Object} props - Props passed to the `Image` component. * @param {string} props.src - URL of the image to be displayed. * @param {string} props.alt - Alternative text to be displayed if the image is not found. * @returns {JSX.Element} - Rendered `Image` component. */ const Image = ({ ...props }) => { const [isLoading, setIsLoading] = useState(true) const imageClassNames = classNames( 'duration-500 ease-in-out', { 'blur-2xl grayscale': isLoading, 'blur-0 grayscale-0': !isLoading }, props.className ) return ( <> setIsLoading(false)} /> ) } export default Image