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