mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Attempt to load a second page of data after the first
This commit is contained in:
parent
2ef5a59d4c
commit
1402e8b6f8
1 changed files with 8 additions and 0 deletions
|
|
@ -113,6 +113,14 @@ export function HomeFeedContainer(props: HomeFeedContainerProps): JSX.Element {
|
|||
setSize(size + 1)
|
||||
}, [size, isValidating])
|
||||
|
||||
useEffect(() => {
|
||||
console.log('size, hasMore, isValidating', size, hasMore, isValidating)
|
||||
if (isValidating || !hasMore || size !== 1) {
|
||||
return
|
||||
}
|
||||
setSize(size + 1)
|
||||
}, [size, isValidating])
|
||||
|
||||
const focusFirstItem = useCallback(() => {
|
||||
if (libraryItems.length < 1) {
|
||||
return
|
||||
|
|
|
|||
Loading…
Reference in a new issue