Rename admin tables
This commit is contained in:
parent
a493619bca
commit
b431e5de5c
@ -21,7 +21,7 @@ import {
|
||||
import { useAppState } from '@/state/AppState';
|
||||
import { RevalidatePhoto } from '@/photo/InfinitePhotoScroll';
|
||||
|
||||
export default function AdminPhotoTable({
|
||||
export default function AdminPhotosTable({
|
||||
photos,
|
||||
onLastPhotoVisible,
|
||||
revalidatePhoto,
|
||||
@ -3,9 +3,9 @@
|
||||
import InfinitePhotoScroll, {
|
||||
InfinitePhotoScrollExternalProps,
|
||||
} from '../photo/InfinitePhotoScroll';
|
||||
import AdminPhotoTable from './AdminPhotoTable';
|
||||
import AdminPhotosTable from './AdminPhotosTable';
|
||||
|
||||
export default function AdminPhotoTableInfinite({
|
||||
export default function AdminPhotosTableInfinite({
|
||||
initialOffset,
|
||||
itemsPerPage,
|
||||
}: InfinitePhotoScrollExternalProps) {
|
||||
@ -18,7 +18,7 @@ export default function AdminPhotoTableInfinite({
|
||||
includeHiddenPhotos
|
||||
>
|
||||
{({ photos, onLastPhotoVisible, revalidatePhoto }) =>
|
||||
<AdminPhotoTable
|
||||
<AdminPhotosTable
|
||||
photos={photos}
|
||||
onLastPhotoVisible={onLastPhotoVisible}
|
||||
revalidatePhoto={revalidatePhoto}
|
||||
@ -11,7 +11,7 @@ import { pathForAdminUploadUrl } from '@/site/paths';
|
||||
import AddButton from './AddButton';
|
||||
import { formatDate } from 'date-fns';
|
||||
|
||||
export default function StorageUrls({
|
||||
export default function AdminUploadsTable({
|
||||
title,
|
||||
urls,
|
||||
}: {
|
||||
@ -2,14 +2,14 @@ import PhotoUpload from '@/photo/PhotoUpload';
|
||||
import { clsx } from 'clsx/lite';
|
||||
import SiteGrid from '@/components/SiteGrid';
|
||||
import { getPhotosCountIncludingHiddenCached } from '@/photo/cache';
|
||||
import StorageUrls from '@/admin/StorageUrls';
|
||||
import AdminUploadsTable from '@/admin/AdminUploadsTable';
|
||||
import { PRO_MODE_ENABLED } from '@/site/config';
|
||||
import { getStoragePhotoUrlsNoStore } from '@/services/storage/cache';
|
||||
import { getPhotos } from '@/photo/db';
|
||||
import { revalidatePath } from 'next/cache';
|
||||
import AdminPhotoTable from '@/admin/AdminPhotoTable';
|
||||
import AdminPhotoTableInfinite from
|
||||
'@/admin/AdminPhotoTableInfinite';
|
||||
import AdminPhotosTable from '@/admin/AdminPhotosTable';
|
||||
import AdminPhotosTableInfinite from
|
||||
'@/admin/AdminPhotosTableInfinite';
|
||||
|
||||
const DEBUG_PHOTO_BLOBS = false;
|
||||
|
||||
@ -50,15 +50,15 @@ export default async function AdminPhotosPage() {
|
||||
'border-b pb-6',
|
||||
'border-gray-200 dark:border-gray-700',
|
||||
)}>
|
||||
<StorageUrls
|
||||
<AdminUploadsTable
|
||||
title={`Photo Blobs (${blobPhotoUrls.length})`}
|
||||
urls={blobPhotoUrls}
|
||||
/>
|
||||
</div>}
|
||||
<div className="space-y-4">
|
||||
<AdminPhotoTable photos={photos} />
|
||||
<AdminPhotosTable photos={photos} />
|
||||
{photosCount > photos.length &&
|
||||
<AdminPhotoTableInfinite
|
||||
<AdminPhotosTableInfinite
|
||||
initialOffset={INFINITE_SCROLL_INITIAL_ADMIN_PHOTOS}
|
||||
itemsPerPage={INFINITE_SCROLL_MULTIPLE_ADMIN_PHOTOS}
|
||||
/>}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import StorageUrls from '@/admin/StorageUrls';
|
||||
import AdminUploadsTable from '@/admin/AdminUploadsTable';
|
||||
import { getStorageUploadUrlsNoStore } from '@/services/storage/cache';
|
||||
import SiteGrid from '@/components/SiteGrid';
|
||||
|
||||
@ -6,7 +6,7 @@ export default async function AdminUploadsPage() {
|
||||
const storageUrls = await getStorageUploadUrlsNoStore();
|
||||
return (
|
||||
<SiteGrid
|
||||
contentMain={<StorageUrls urls={storageUrls} />}
|
||||
contentMain={<AdminUploadsTable urls={storageUrls} />}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user