From 59ac6489b6c4488e9b2fd9b6018049aa59df6719 Mon Sep 17 00:00:00 2001 From: Hope Tambala Date: Sun, 3 Apr 2022 09:59:50 -0400 Subject: [PATCH] fix: Issue where the app wasn't able to be navigated due to blocked resources --- context/offline.context.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/context/offline.context.js b/context/offline.context.js index a357e7198..83202f60d 100644 --- a/context/offline.context.js +++ b/context/offline.context.js @@ -1,5 +1,5 @@ import React, { - createContext, useContext, useEffect, useState + createContext, useContext, useState } from 'react'; import { getData, storeData } from '../modules/async-storage'; @@ -13,10 +13,10 @@ export const OfflineContextProvider = ({ children }) => { const [residents, setResidents] = useState(null); const { user } = useContext(UserContext); - useEffect(() => { - const cache = async () => populateResidentDataCache(); - if (user) cache(); - }, [user]); + // useEffect(() => { + // const cache = async () => populateResidentDataCache(); + // if (user) cache(); + // }, [user]); const populateResidentDataCache = async () => residentOnlineData().then((records) => { populateCache(user);