Fix tag edit admin links

This commit is contained in:
Sam Becker 2025-02-05 09:32:55 -06:00
parent 04d50da0f5
commit 70b7b609ee
2 changed files with 5 additions and 3 deletions

View File

@ -38,7 +38,7 @@ export default async function PhotoPageEdit({
>
<TagForm {...{ tag, photos }}>
<PhotoLightbox
{...{ count, photos }}
{...{ count, photos, tag }}
maxPhotosToShow={MAX_PHOTO_TO_SHOW}
moreLink={pathForTag(tag)}
/>

View File

@ -1,5 +1,5 @@
import { clsx } from 'clsx/lite';
import { Photo } from '.';
import { Photo, PhotoSetCategory } from '.';
import PhotoGrid from './PhotoGrid';
import Link from 'next/link';
@ -8,12 +8,13 @@ export default function PhotoLightbox({
photos,
maxPhotosToShow = 6,
moreLink,
...categories
}: {
count: number
photos: Photo[]
maxPhotosToShow?: number
moreLink: string
}) {
} & PhotoSetCategory) {
const photoCountToShow = maxPhotosToShow < count
? maxPhotosToShow - 1
: maxPhotosToShow;
@ -28,6 +29,7 @@ export default function PhotoLightbox({
'bg-gray-50 dark:bg-gray-950',
)}>
<PhotoGrid
{...categories}
photos={photos.slice(0, photoCountToShow)}
animate={false}
additionalTile={showOverageTile