Open erikksuzuki opened 1 year ago
<TinySlider onClick={showSlideInfo} settings={settings}> {sideImages.map((image: any, index: number) => { return ( <div className="relative w-[140px]" key={`sideimage-${index}`}> <img id={`slideid-${image.index}`} src={image.src} className="cursor-pointer w-full opacity-50 hover:opacity-100 transition-all" style={{ transitionProperty: 'all', transitionTimingFunction: 'cubic-bezier(0.4, 0, 0.2, 1)', transitionDuration: '400ms', }} onClick={() => openLightbox(image.src)} /> </div> ) })} </TinySlider> </div>``` openLightbox() works the first time the slider goes through the images, but after the loop it the onClick property seems to disappear entirely.