Forgot to update a few comments after refactor.

This commit is contained in:
Yura Dupyn 2026-05-15 11:40:13 +02:00
parent 65fe6a9a82
commit 24334cb342

View file

@ -98,7 +98,7 @@ const Page = {
},
previous(page: Page): Page {
// Could do
// if (page.page == FIRST_PAGE) { return page }
// if (page.index == FIRST_PAGE) { return page }
// this preserves identity of object, so is nicer for `useEffect`, but it's waaaay to subtle. So I'm not relying on that.
return { ...page, index: Math.max(FIRST_PAGE, page.index - 1) }
},
@ -291,7 +291,7 @@ function imageGridStyle(dimension: Dimension) {
}
}
// 2x5 on mobile, 5x2 on desktop (assuming 10 images per page)
// EXAMPLE: 2x5 on mobile, 5x2 on desktop (assuming 10 images per page)
function ImagesSkeleton({ visible = true }: { visible?: boolean }) {
const images = Array.from({ length: CONFIG.pageSize })
return (