fix not cached date

This commit is contained in:
Pritimay Sarkar
2023-11-24 19:28:16 +05:30
parent e497f2dda1
commit 81d4c756fa

View File

@@ -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 = [];