* Introduce configurable photo sort order * Fix recents image pre-rendering * Refine sort order config * Store sort order in client state * Add core views to support sort * Separate sort and priority preferences * Consolidate imports, add lint rule * Refine photo sorting documentation * Update README sort text * Finalize sort config
35 lines
845 B
TypeScript
35 lines
845 B
TypeScript
'use client';
|
|
|
|
import { PATH_FEED_INFERRED } from '@/app/paths';
|
|
import InfinitePhotoScroll from './InfinitePhotoScroll';
|
|
import PhotosLarge from './PhotosLarge';
|
|
import { SortBy } from './db/sort';
|
|
|
|
export default function PhotosLargeInfinite({
|
|
initialOffset,
|
|
itemsPerPage,
|
|
sortBy,
|
|
}: {
|
|
initialOffset: number
|
|
itemsPerPage: number
|
|
sortBy: SortBy
|
|
sortWithPriority: boolean
|
|
}) {
|
|
return (
|
|
<InfinitePhotoScroll
|
|
cacheKey={`page-${PATH_FEED_INFERRED}`}
|
|
initialOffset={initialOffset}
|
|
itemsPerPage={itemsPerPage}
|
|
sortBy={sortBy}
|
|
wrapMoreButtonInGrid
|
|
>
|
|
{({ photos, onLastPhotoVisible, revalidatePhoto }) =>
|
|
<PhotosLarge
|
|
photos={photos}
|
|
onLastPhotoVisible={onLastPhotoVisible}
|
|
revalidatePhoto={revalidatePhoto}
|
|
/>}
|
|
</InfinitePhotoScroll>
|
|
);
|
|
}
|