diff --git a/web/hooks/use-pagination.ts b/web/hooks/use-pagination.ts index ab991d1f..5aa65bfe 100644 --- a/web/hooks/use-pagination.ts +++ b/web/hooks/use-pagination.ts @@ -91,9 +91,15 @@ export const usePagination = (opts: PaginationOptions) => { const nextQ = lastDoc ? query(state.baseQ, startAfter(lastDoc), limit(state.pageSize)) : query(state.baseQ, limit(state.pageSize)) - return onSnapshot(nextQ, (snapshot) => { - dispatch({ type: 'LOAD', snapshot }) - }) + return onSnapshot( + nextQ, + (snapshot) => { + dispatch({ type: 'LOAD', snapshot }) + }, + (error) => { + console.error('error', error) + } + ) } }, [state.isLoading, state.baseQ, state.docs, state.pageSize])