Forgot to update a few comments after refactor.
This commit is contained in:
parent
65fe6a9a82
commit
24334cb342
1 changed files with 2 additions and 2 deletions
|
|
@ -98,7 +98,7 @@ const Page = {
|
||||||
},
|
},
|
||||||
previous(page: Page): Page {
|
previous(page: Page): Page {
|
||||||
// Could do
|
// 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.
|
// 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) }
|
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 }) {
|
function ImagesSkeleton({ visible = true }: { visible?: boolean }) {
|
||||||
const images = Array.from({ length: CONFIG.pageSize })
|
const images = Array.from({ length: CONFIG.pageSize })
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue