Vercel/src/photo/PhotoOGTile.tsx
Sam Becker 646f32e642
Rich sort controls (#283)
* Generalize app switcher menus

* Organize sort module

* Build configuration for nav sort control

* Refine sort menu styles

* Upgrade next.js

* Reset custom sort when clicking grid/full a second time

* Light up sort button when overridden
2025-07-15 22:43:36 -05:00

33 lines
711 B
TypeScript

'use client';
import {
Photo,
descriptionForPhoto,
titleForPhoto,
} from '@/photo';
import { PhotoSetCategory } from '../category';
import { pathForPhoto, pathForPhotoImage } from '@/app/path';
import OGTile, { OGTilePropsCore } from '@/components/og/OGTile';
export default function PhotoOGTile({
photo,
riseOnHover,
retryTime,
onVisible,
...categories
}: {
photo: Photo
} & PhotoSetCategory & OGTilePropsCore) {
return (
<OGTile {...{
title: titleForPhoto(photo),
description: descriptionForPhoto(photo),
path: pathForPhoto({ photo, ...categories }),
pathImage: pathForPhotoImage(photo),
riseOnHover,
retryTime,
onVisible,
}} />
);
};