Skip to content

Commit

Permalink
fix: Issue where the app wasn't able to be navigated due to blocked r…
Browse files Browse the repository at this point in the history
…esources
  • Loading branch information
hopetambala committed Apr 3, 2022
1 parent b406308 commit 59ac648
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions context/offline.context.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, {
createContext, useContext, useEffect, useState
createContext, useContext, useState
} from 'react';

import { getData, storeData } from '../modules/async-storage';
Expand All @@ -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);
Expand Down

0 comments on commit 59ac648

Please sign in to comment.