* Make /db top-level module * Create Album type * Pin pnpm version * Generalize query modules * Finalize album postgres data type * Remove temp albums prop * Create basic album primitives * Fix temporary album bugs * Add albums to sidebar * Disambiguate string date utilities * Localize album language * Add album join option to core photo queries * Tweak album icon placement * Add album photo detail page * Refine Album data model * Display album subhead when available * Generate album og images * Finalize album share modal * Add albums to sitemap * Statically pre-render albums * Display tags on albums * Add albums to cmd-k menu * Handle album tag overflow * Stop truncating album subheads * Create core admin album views * Make albums editable * Create/edit albums on photo save, add delete album
54 lines
1.2 KiB
TypeScript
54 lines
1.2 KiB
TypeScript
import { Photo, PhotoDateRangePostgres } from '@/photo';
|
|
import PhotoHeader from '@/photo/PhotoHeader';
|
|
import { Lens, lensFromPhoto } from '.';
|
|
import PhotoLens from './PhotoLens';
|
|
import { descriptionForLensPhotos } from './meta';
|
|
import { AI_CONTENT_GENERATION_ENABLED } from '@/app/config';
|
|
import { getAppText } from '@/i18n/state/server';
|
|
|
|
export default async function LensHeader({
|
|
lens: lensProp,
|
|
photos,
|
|
selectedPhoto,
|
|
indexNumber,
|
|
count,
|
|
dateRange,
|
|
}: {
|
|
lens: Lens
|
|
photos: Photo[]
|
|
selectedPhoto?: Photo
|
|
indexNumber?: number
|
|
count?: number
|
|
dateRange?: PhotoDateRangePostgres
|
|
}) {
|
|
const lens = lensFromPhoto(photos[0], lensProp);
|
|
const appText = await getAppText();
|
|
|
|
return (
|
|
<PhotoHeader
|
|
lens={lens}
|
|
entity={<PhotoLens
|
|
{...{ lens }}
|
|
contrast="high"
|
|
hoverType="none"
|
|
longText
|
|
/>}
|
|
entityDescription={
|
|
descriptionForLensPhotos(
|
|
photos,
|
|
appText,
|
|
undefined,
|
|
count,
|
|
dateRange,
|
|
)}
|
|
photos={photos}
|
|
selectedPhoto={selectedPhoto}
|
|
indexNumber={indexNumber}
|
|
count={count}
|
|
dateRange={dateRange}
|
|
hasAiTextGeneration={AI_CONTENT_GENERATION_ENABLED}
|
|
includeShareButton
|
|
/>
|
|
);
|
|
}
|