* 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
34 lines
756 B
TypeScript
34 lines
756 B
TypeScript
import {
|
|
INFINITE_SCROLL_FULL_MULTIPLE,
|
|
Photo,
|
|
} from '.';
|
|
import PhotosLarge from './PhotosLarge';
|
|
import PhotosLargeInfinite from './PhotosLargeInfinite';
|
|
import { SortBy } from './sort';
|
|
|
|
export default function PhotoFullPage({
|
|
photos,
|
|
photosCount,
|
|
sortBy,
|
|
sortWithPriority,
|
|
}:{
|
|
photos: Photo[]
|
|
photosCount: number
|
|
sortBy: SortBy
|
|
sortWithPriority: boolean
|
|
}) {
|
|
return (
|
|
<div className="space-y-1">
|
|
<PhotosLarge {...{ photos }} />
|
|
{photosCount > photos.length &&
|
|
<PhotosLargeInfinite
|
|
initialOffset={photos.length}
|
|
itemsPerPage={INFINITE_SCROLL_FULL_MULTIPLE}
|
|
sortBy={sortBy}
|
|
sortWithPriority={sortWithPriority}
|
|
excludeFromFeeds
|
|
/>}
|
|
</div>
|
|
);
|
|
}
|