cache 17 dec data

This commit is contained in:
Pritimay Sarkar
2023-12-18 10:39:48 +05:30
parent 9121dda277
commit 1a883a6711

View File

@@ -7,12 +7,12 @@ import Card from './components/Card';
import db from './firebase';
function App() {
const registrationCached = 16329;
const malesCached = 6741;
const femalesCached = 9179;
const normalCached = 7153;
const traitsCached = 2312;
const diseasesCached = 365;
const registrationCached = 19453;
const malesCached = 8321;
const femalesCached = 10646;
const normalCached = 9626;
const traitsCached = 2575;
const diseasesCached = 388;
const [totalScreened, setTotalScreened] = useState(0);
const [males, setMales] = useState(0);
const [females, setFemales] = useState(0);
@@ -26,7 +26,7 @@ function App() {
useEffect(() => {
// const q = query(collection(db, "patientData")); // cached
const notCachedDate = "2023-11-12";
const notCachedDate = "2023-12-17";
const q = query(collection(db, "patientData"), where("createdAt", ">=", moment(notCachedDate).format("YYYY-MM-DD")));
const unsub = onSnapshot(q, (querySnapshot) => {
@@ -54,7 +54,7 @@ function App() {
}, []);
useEffect(() => {
const notCachedDate = "2023-11-12";
const notCachedDate = "2023-12-17";
const q = query(collection(db, "testData"), where("testTime", ">=", moment(notCachedDate).format("YYYY-MM-DD")));
const unsub = onSnapshot(q, (querySnapshot) => {