- {renderPhotoText()}
+ :
+ {renderPhotoCTA()}
}
{tagErrorMessage &&
diff --git a/src/admin/DeletePhotosButton.tsx b/src/admin/DeletePhotosButton.tsx
index 68492f4a..b71f89e7 100644
--- a/src/admin/DeletePhotosButton.tsx
+++ b/src/admin/DeletePhotosButton.tsx
@@ -29,7 +29,7 @@ export default function DeletePhotosButton({
} & ComponentProps
) {
const [isLoading, setIsLoading] = useState(false);
- const photosText = photoQuantityText(photoIds.length, false);
+ const photosText = photoQuantityText(photoIds.length, false, false);
const { invalidateSwr, registerAdminUpdate } = useAppState();
diff --git a/src/photo/index.ts b/src/photo/index.ts
index 2d861363..646bd13e 100644
--- a/src/photo/index.ts
+++ b/src/photo/index.ts
@@ -194,13 +194,19 @@ export const titleForPhoto = (photo: Photo) =>
export const altTextForPhoto = (photo: Photo) =>
photo.semanticDescription || titleForPhoto(photo);
-export const photoLabelForCount = (count: number) =>
- count === 1 ? 'Photo' : 'Photos';
+export const photoLabelForCount = (count: number, capitalize = true) =>
+ capitalize
+ ? count === 1 ? 'Photo' : 'Photos'
+ : count === 1 ? 'photo' : 'photos';
-export const photoQuantityText = (count: number, includeParentheses = true) =>
+export const photoQuantityText = (
+ count: number,
+ includeParentheses = true,
+ capitalize?: boolean,
+) =>
includeParentheses
- ? `(${count} ${photoLabelForCount(count)})`
- : `${count} ${photoLabelForCount(count)}`;
+ ? `(${count} ${photoLabelForCount(count, capitalize)})`
+ : `${count} ${photoLabelForCount(count, capitalize)}`;
export const deleteConfirmationTextForPhoto = (photo: Photo) =>
`Are you sure you want to delete "${titleForPhoto(photo)}?"`;
@@ -219,7 +225,7 @@ export const descriptionForPhotoSet = (
: [
explicitCount ?? photos.length,
descriptor,
- photoLabelForCount(explicitCount ?? photos.length),
+ photoLabelForCount(explicitCount ?? photos.length, false),
].join(' ');
const sortPhotosByDate = (