Omit Apple make from camera title meta

This commit is contained in:
Sam Becker 2023-11-09 18:32:54 -06:00
parent 584412dc45
commit 3f9c593ec0
2 changed files with 8 additions and 3 deletions

View File

@ -33,5 +33,10 @@ export const cameraFromPhoto = (
? getCameraFromKey(fallback) ? getCameraFromKey(fallback)
: fallback ?? CAMERA_PLACEHOLDER; : fallback ?? CAMERA_PLACEHOLDER;
export const formatCameraText = ({ make, model }: Camera) => export const formatCameraText = (
`${make} ${model}`; { make, model }: Camera,
includeMakeApple = true,
) =>
make === 'Apple' && !includeMakeApple
? model
: `${make} ${model}`;

View File

@ -20,7 +20,7 @@ export const titleForCamera = (
explicitCount?: number, explicitCount?: number,
) => [ ) => [
'Shot on', 'Shot on',
formatCameraText(cameraFromPhoto(photos[0], camera)), formatCameraText(cameraFromPhoto(photos[0], camera), false),
photoQuantityText(explicitCount ?? photos.length), photoQuantityText(explicitCount ?? photos.length),
].join(' '); ].join(' ');