'use client'; import AppGrid from '@/components/AppGrid'; import PhotoGrid from './PhotoGrid'; import PhotoGridInfinite from './PhotoGridInfinite'; import { clsx } from 'clsx/lite'; import AnimateItems from '@/components/AnimateItems'; import { ComponentProps, useCallback, useState, ReactNode } from 'react'; import { GRID_SPACE_CLASSNAME } from '@/components'; export default function PhotoGridContainer({ cacheKey, photos, count, animateOnFirstLoadOnly, header, sidebar, canSelect, ...categories }: { cacheKey: string count: number header?: ReactNode sidebar?: ReactNode } & ComponentProps) { const [ shouldAnimateDynamicItems, setShouldAnimateDynamicItems, ] = useState(false); const onAnimationComplete = useCallback(() => setShouldAnimateDynamicItems(true), []); return ( {header && }
{count > photos.length && }
} contentSide={sidebar} sideHiddenOnMobile /> ); }