'use client'; import PhotoUpload from '@/photo/PhotoUpload'; import { clsx } from 'clsx/lite'; import SiteGrid from '@/components/SiteGrid'; import { AI_TEXT_GENERATION_ENABLED, PRO_MODE_ENABLED } from '@/site/config'; import AdminPhotosTable from '@/admin/AdminPhotosTable'; import AdminPhotosTableInfinite from '@/admin/AdminPhotosTableInfinite'; import PathLoaderButton from '@/components/primitives/PathLoaderButton'; import { PATH_ADMIN_OUTDATED } from '@/site/paths'; import { Photo } from '@/photo'; import { StorageListResponse } from '@/services/storage'; import { useState } from 'react'; import { LiaBroomSolid } from 'react-icons/lia'; import AdminUploadsTable from './AdminUploadsTable'; import { Timezone } from '@/utility/timezone'; export default function AdminPhotosClient({ photos, photosCount, photosCountOutdated, onLastPhotoUpload, blobPhotoUrls, infiniteScrollInitial, infiniteScrollMultiple, timezone, }: { photos: Photo[] photosCount: number photosCountOutdated: number onLastPhotoUpload: () => Promise blobPhotoUrls: StorageListResponse infiniteScrollInitial: number infiniteScrollMultiple: number timezone: Timezone }) { const [isUploading, setIsUploading] = useState(false); return (
{photosCountOutdated > 0 && } title={`${photosCountOutdated} Outdated Photos`} className={clsx( isUploading && 'hidden md:inline-flex', )} hideTextOnMobile={false} > {photosCountOutdated} }
{blobPhotoUrls.length > 0 &&
Photo Blobs ({blobPhotoUrls.length})
} {/* Use custom spacing to address gap/space-y compatibility quirks */}
{photosCount > photos.length && }
} /> ); }