From 81d4c756fa0dcb747ae87fd22b8b782e701a2744 Mon Sep 17 00:00:00 2001 From: Pritimay Sarkar Date: Fri, 24 Nov 2023 19:28:16 +0530 Subject: [PATCH] fix not cached date --- src/App.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/App.js b/src/App.js index 9f4a330..6bc6479 100644 --- a/src/App.js +++ b/src/App.js @@ -26,7 +26,8 @@ function App() { useEffect(() => { // const q = query(collection(db, "patientData")); // cached - const q = query(collection(db, "patientData"), where("testTime", ">=", moment().format("YYYY-MM-DD"))); + const notCachedDate = "2023-11-12"; + const q = query(collection(db, "patientData"), where("createdAt", ">=", moment(notCachedDate).format("YYYY-MM-DD"))); const unsub = onSnapshot(q, (querySnapshot) => { const patients = []; @@ -53,7 +54,8 @@ function App() { }, []); useEffect(() => { - const q = query(collection(db, "testData"), where("testTime", ">=", moment().format("YYYY-MM-DD"))); + const notCachedDate = "2023-11-12"; + const q = query(collection(db, "testData"), where("testTime", ">=", moment(notCachedDate).format("YYYY-MM-DD"))); const unsub = onSnapshot(q, (querySnapshot) => { const hposTests = [];