Align og image links with share links

This commit is contained in:
Sam Becker 2025-02-05 19:43:04 -06:00
parent 771f9a46cd
commit 65e9e8031c
2 changed files with 9 additions and 7 deletions

View File

@ -1,5 +1,6 @@
import {
Photo,
PhotoSetCategory,
descriptionForPhoto,
titleForPhoto,
} from '@/photo';
@ -16,6 +17,7 @@ export default function PhotoOGTile({
onFail,
retryTime,
onVisible,
...categories
}: {
photo: Photo
loadingState?: OGLoadingState
@ -24,12 +26,12 @@ export default function PhotoOGTile({
riseOnHover?: boolean
retryTime?: number
onVisible?: () => void
}) {
} & PhotoSetCategory) {
return (
<OGTile {...{
title: titleForPhoto(photo),
description: descriptionForPhoto(photo),
path: pathForPhoto({ photo }),
path: pathForPhoto({ photo, ...categories }),
pathImageAbsolute: absolutePathForPhotoImage(photo),
loadingState: loadingStateExternal,
onLoad,
@ -37,6 +39,6 @@ export default function PhotoOGTile({
riseOnHover,
retryTime,
onVisible,
}}/>
}} />
);
};

View File

@ -3,9 +3,9 @@ import { absolutePathForPhoto } from '@/site/paths';
import { Photo, PhotoSetCategory } from '.';
import ShareModal from '@/share/ShareModal';
export default function PhotoShareModal(props: {
photo: Photo
} & PhotoSetCategory) {
export default function PhotoShareModal(
props: { photo: Photo } & PhotoSetCategory,
) {
return (
<ShareModal
pathShare={absolutePathForPhoto(props)}
@ -14,4 +14,4 @@ export default function PhotoShareModal(props: {
<PhotoOGTile photo={props.photo} />
</ShareModal>
);
};
}