'use client'; import { Photo, altTextForPhoto, doesPhotoNeedBlurCompatibility, } from '.'; import { PhotoSetCategory } from '../category'; import ImageMedium from '@/components/image/ImageMedium'; import { clsx } from 'clsx/lite'; import { pathForPhoto } from '@/app/paths'; import { SHOULD_PREFETCH_ALL_LINKS } from '@/app/config'; import { useRef } from 'react'; import useVisible from '@/utility/useVisible'; import LinkWithStatus from '@/components/LinkWithStatus'; import Spinner from '@/components/Spinner'; export default function PhotoMedium({ photo, selected, priority, prefetch = SHOULD_PREFETCH_ALL_LINKS, className, onVisible, ...categories }: { photo: Photo selected?: boolean priority?: boolean prefetch?: boolean className?: string onVisible?: () => void } & PhotoSetCategory) { const ref = useRef(null); useVisible({ ref, onVisible }); return ( {({ isLoading }) =>
{isLoading &&
}
}
); };