From f79d69cd6924519f5fe92b67880ae677d6fc8011 Mon Sep 17 00:00:00 2001 From: Austin Chen Date: Mon, 20 Dec 2021 09:56:27 -0800 Subject: [PATCH] Increase default fetch size 25 -> 99 --- web/lib/firebase/contracts.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/lib/firebase/contracts.ts b/web/lib/firebase/contracts.ts index f4c7de2f..4942d721 100644 --- a/web/lib/firebase/contracts.ts +++ b/web/lib/firebase/contracts.ts @@ -105,7 +105,7 @@ export async function listContracts(creatorId: string): Promise { } export async function listAllContracts(): Promise { - const q = query(contractCollection, orderBy('createdTime', 'desc'), limit(25)) + const q = query(contractCollection, orderBy('createdTime', 'desc'), limit(99)) const snapshot = await getDocs(q) return snapshot.docs.map((doc) => doc.data() as Contract) } @@ -113,7 +113,7 @@ export async function listAllContracts(): Promise { export function listenForContracts( setContracts: (contracts: Contract[]) => void ) { - const q = query(contractCollection, orderBy('createdTime', 'desc'), limit(25)) + const q = query(contractCollection, orderBy('createdTime', 'desc'), limit(99)) return onSnapshot(q, (snap) => { setContracts(snap.docs.map((doc) => doc.data() as Contract)) })