* Add 'recents' and 'years' categories * Add recents and years visibility config * Add fundamental recent/year queries * Display initial date-based data in sidebar * Adjust recents data type * Remove date rage from sidebar footer * Reformat recents/years in sidebar * Organize years in grid * Rename date -> year * Add year-based views * Split sidebar years into rows * Add years to cmdk menu * Localize 'years' * Create /recents views * Enable recents share modals * Fix recents og image * Statically optimize /recents image * Don't statically optimize /recents page * Update i18n * Add recents to cmdk * Suppress spinner for year badges * Refactor sidebar height calculation * Add recents to sitemap
32 lines
667 B
TypeScript
32 lines
667 B
TypeScript
import { descriptionForPhotoSet, Photo, PhotoDateRange } from '@/photo';
|
|
import { AppTextState } from '@/i18n/state';
|
|
import {
|
|
absolutePathForRecents,
|
|
absolutePathForRecentsImage,
|
|
} from '@/app/paths';
|
|
|
|
export const generateMetaForRecents = (
|
|
photos: Photo[],
|
|
appText: AppTextState,
|
|
count?: number,
|
|
_dateRange?: PhotoDateRange,
|
|
) => {
|
|
const title = appText.category.recentTitle;
|
|
const description = descriptionForPhotoSet(
|
|
photos,
|
|
appText,
|
|
undefined,
|
|
undefined,
|
|
count,
|
|
);
|
|
const url = absolutePathForRecents();
|
|
const images = absolutePathForRecentsImage();
|
|
|
|
return {
|
|
title,
|
|
description,
|
|
url,
|
|
images,
|
|
};
|
|
};
|