From fa4eae339cd08f907caeaf45b6681e9f90ac046e Mon Sep 17 00:00:00 2001 From: Wck-iipi <110763795+Wck-iipi@users.noreply.github.com> Date: Wed, 16 Oct 2024 17:00:52 +0530 Subject: [PATCH] alt made compulsory to add in ResponsiveImage --- components/sponsors/ResponsiveImage.tsx | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/components/sponsors/ResponsiveImage.tsx b/components/sponsors/ResponsiveImage.tsx index f73acde9acf..e5d20657cb4 100644 --- a/components/sponsors/ResponsiveImage.tsx +++ b/components/sponsors/ResponsiveImage.tsx @@ -3,7 +3,7 @@ import { twMerge } from 'tailwind-merge'; interface ResponsiveImageProps { src: string; - alt?: string; + alt: string; className?: string; dataTestId: string; } @@ -16,10 +16,22 @@ interface ResponsiveImageProps { * @param {string} props.className - Additional CSS class names for styling the image. * @param {string} props.dataTestId - A string for identifying the element during testing. */ -const ResponsiveImage: React.FC = ({ src, alt, className, dataTestId }) => { +const ResponsiveImage: React.FC = ({ + src, + alt, + className, + dataTestId, +}) => { const classNameMerged = twMerge('w-full h-12 object-contain', className); - return {alt}; + return ( + {alt} + ); }; export default ResponsiveImage;