Prioritize initial /grid photos
This commit is contained in:
parent
548b3e6f4c
commit
495b64aaec
@ -36,7 +36,7 @@ export default async function GridPage() {
|
|||||||
photos.length > 0
|
photos.length > 0
|
||||||
? <SiteGrid
|
? <SiteGrid
|
||||||
contentMain={<div className="space-y-0.5 sm:space-y-1">
|
contentMain={<div className="space-y-0.5 sm:space-y-1">
|
||||||
<PhotoGrid {...{ photos }} />
|
<PhotoGrid {...{ photos, photoPriority: true }} />
|
||||||
<Suspense>
|
<Suspense>
|
||||||
<MorePhotosGrid
|
<MorePhotosGrid
|
||||||
initialOffset={INFINITE_SCROLL_MULTIPLE_GRID}
|
initialOffset={INFINITE_SCROLL_MULTIPLE_GRID}
|
||||||
|
|||||||
@ -7,18 +7,21 @@ export default function ImageSmall({
|
|||||||
alt,
|
alt,
|
||||||
aspectRatio,
|
aspectRatio,
|
||||||
blurData,
|
blurData,
|
||||||
|
priority,
|
||||||
}: {
|
}: {
|
||||||
className?: string
|
className?: string
|
||||||
src: string
|
src: string
|
||||||
alt: string
|
alt: string
|
||||||
aspectRatio: number
|
aspectRatio: number
|
||||||
blurData?: string
|
blurData?: string
|
||||||
|
priority?: boolean
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<ImageBlurFallback {...{
|
<ImageBlurFallback {...{
|
||||||
className,
|
className,
|
||||||
src,
|
src,
|
||||||
alt,
|
alt,
|
||||||
|
priority,
|
||||||
blurDataURL: blurData,
|
blurDataURL: blurData,
|
||||||
placeholder: 'blur',
|
placeholder: 'blur',
|
||||||
width: IMAGE_SMALL_WIDTH,
|
width: IMAGE_SMALL_WIDTH,
|
||||||
|
|||||||
@ -12,6 +12,7 @@ export default function PhotoGrid({
|
|||||||
tag,
|
tag,
|
||||||
camera,
|
camera,
|
||||||
simulation,
|
simulation,
|
||||||
|
photoPriority,
|
||||||
fast,
|
fast,
|
||||||
animate = true,
|
animate = true,
|
||||||
animateOnFirstLoadOnly,
|
animateOnFirstLoadOnly,
|
||||||
@ -24,6 +25,7 @@ export default function PhotoGrid({
|
|||||||
tag?: string
|
tag?: string
|
||||||
camera?: Camera
|
camera?: Camera
|
||||||
simulation?: FilmSimulation
|
simulation?: FilmSimulation
|
||||||
|
photoPriority?: boolean
|
||||||
fast?: boolean
|
fast?: boolean
|
||||||
animate?: boolean
|
animate?: boolean
|
||||||
animateOnFirstLoadOnly?: boolean
|
animateOnFirstLoadOnly?: boolean
|
||||||
@ -72,6 +74,7 @@ export default function PhotoGrid({
|
|||||||
camera,
|
camera,
|
||||||
simulation,
|
simulation,
|
||||||
selected: photo.id === selectedPhoto?.id,
|
selected: photo.id === selectedPhoto?.id,
|
||||||
|
priority: photoPriority,
|
||||||
}} />
|
}} />
|
||||||
</div>).concat(additionalTile ?? [])}
|
</div>).concat(additionalTile ?? [])}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -15,6 +15,7 @@ export default function PhotoSmall({
|
|||||||
simulation,
|
simulation,
|
||||||
selected,
|
selected,
|
||||||
showAdminMenu,
|
showAdminMenu,
|
||||||
|
priority,
|
||||||
}: {
|
}: {
|
||||||
photo: Photo
|
photo: Photo
|
||||||
tag?: string
|
tag?: string
|
||||||
@ -22,6 +23,7 @@ export default function PhotoSmall({
|
|||||||
simulation?: FilmSimulation
|
simulation?: FilmSimulation
|
||||||
selected?: boolean
|
selected?: boolean
|
||||||
showAdminMenu?: boolean
|
showAdminMenu?: boolean
|
||||||
|
priority?: boolean
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<Link
|
<Link
|
||||||
@ -48,6 +50,7 @@ export default function PhotoSmall({
|
|||||||
blurData={photo.blurData}
|
blurData={photo.blurData}
|
||||||
className="w-full"
|
className="w-full"
|
||||||
alt={titleForPhoto(photo)}
|
alt={titleForPhoto(photo)}
|
||||||
|
priority={priority}
|
||||||
/>
|
/>
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user