src/components/lightbox/next-js-image.tsx// import Image from 'next/image'import {isImageFitCover,isImageSlide,useLightboxProps,} from 'yet-another-react-lightbox'function isNextJsImage(slide: any) {return (isImageSlide(slide) &&typeof slide.width === 'number' &&typeof slide.height === 'number')}export function NextJsThumbnail({ slide, rect }: any) {const { imageFit } = useLightboxProps().carouselconst cover = isImageSlide(slide) && isImageFitCover(slide, imageFit)if (!isNextJsImage(slide)) return undefined
Showing the first 20 lines.
Get full code