From abf3fc34edecff6dd77f41850ba745db457a6c68 Mon Sep 17 00:00:00 2001 From: Sam Becker Date: Sun, 21 Jan 2024 12:38:36 -0600 Subject: [PATCH] Only show photo info overlay in og images when exif data is present --- .../image-response/PhotoImageResponse.tsx | 37 ++++++++++--------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/src/photo/image-response/PhotoImageResponse.tsx b/src/photo/image-response/PhotoImageResponse.tsx index 499ca283..5874e4dd 100644 --- a/src/photo/image-response/PhotoImageResponse.tsx +++ b/src/photo/image-response/PhotoImageResponse.tsx @@ -1,4 +1,4 @@ -import { Photo } from '..'; +import { Photo, photoHasExifData } from '..'; import { AiFillApple } from 'react-icons/ai'; import ImageCaption from './components/ImageCaption'; import ImagePhotoGrid from './components/ImagePhotoGrid'; @@ -30,25 +30,26 @@ export default function PhotoImageResponse({ height, ...OG_TEXT_BOTTOM_ALIGNMENT && { imagePosition: 'top' }, }} /> - - {photo.make === 'Apple' && + {photoHasExifData(photo) && + + {photo.make === 'Apple' && +
+ +
} + {model && +
+ {model} +
}
- -
} - {model && + {photo.focalLengthFormatted} +
- {model} -
} -
- {photo.focalLengthFormatted} -
-
- {photo.fNumberFormatted} -
-
- {photo.isoFormatted} -
-
+ {photo.fNumberFormatted} + +
+ {photo.isoFormatted} +
+
} ); };