1- import React , { useState } from 'react' ;
21import Image from 'next/image' ;
3- import { booleanFilter } from '../../util/booleanFilter' ;
4- import type { EventData } from '../../types' ;
52import Link from 'next/link' ;
3+ import { useState } from 'react' ;
4+ import type { EventData } from '../../types' ;
5+ import { booleanFilter } from '../../util/booleanFilter' ;
66
77type DisplayRCProps = EventData ;
88
@@ -14,20 +14,21 @@ export default function DisplayRC({
1414} : DisplayRCProps ) {
1515 const [ loading , setLoading ] = useState ( true ) ;
1616 return (
17- < div className = "flex flex-col px-6 py-4 bg-white rounded-lg shadow-md gap-y-2" >
18- < div className = "w-full overflow-hidden rounded-lg cursor-auto aspect-w-1 aspect-h-1" >
17+ < div className = "group flex flex-col px-6 py-4 bg-white rounded-lg shadow-md gap-y-2" >
18+ < div className = "relative w-full overflow-hidden rounded-lg cursor-auto aspect-w-1 aspect-h-1" >
1919 < Image
2020 alt = { description }
2121 src = { ! src ? 'https://bit.ly/placeholder-img' : src }
22- layout = "fill"
23- objectFit = "contain"
22+ width = { 800 }
23+ height = { 600 }
24+ style = { { objectFit : 'contain' } }
2425 className = { booleanFilter (
2526 'duration-700 ease-in-out group-hover:opacity-75' ,
2627 loading
2728 ? 'scale-110 blur-2xl grayscale'
2829 : 'scale-100 blur-0 grayscale-0'
2930 ) }
30- onLoadingComplete = { ( ) => setLoading ( false ) }
31+ onLoad = { ( ) => setLoading ( false ) }
3132 />
3233 </ div >
3334 < h2 className = "text-lg md:text-xl font-bold cursor-pointer hover:text-[#09AFC6]" >
0 commit comments