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

View File

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