diff --git a/apolloschurchapp/__mocks__/@react-native-community/async-storage.js b/apolloschurchapp/__mocks__/@react-native-community/async-storage.js index c0058ae44..a4bf3f4d7 100644 --- a/apolloschurchapp/__mocks__/@react-native-community/async-storage.js +++ b/apolloschurchapp/__mocks__/@react-native-community/async-storage.js @@ -1,23 +1,20 @@ let cache = {}; export default { setItem: (key, value) => - new Promise( - (resolve, reject) => - typeof key !== 'string' || typeof value !== 'string' - ? reject(new Error('key and value must be string')) - : resolve((cache[key] = value)) + new Promise((resolve, reject) => + typeof key !== 'string' || typeof value !== 'string' + ? reject(new Error('key and value must be string')) + : resolve((cache[key] = value)) ), getItem: (key, value) => - new Promise( - (resolve) => - cache.hasOwnProperty(key) ? resolve(cache[key]) : resolve(null) + new Promise((resolve) => + cache.hasOwnProperty(key) ? resolve(cache[key]) : resolve(null) ), removeItem: (key) => - new Promise( - (resolve, reject) => - cache.hasOwnProperty(key) - ? resolve(delete cache[key]) - : reject('No such key!') + new Promise((resolve, reject) => + cache.hasOwnProperty(key) + ? resolve(delete cache[key]) + : reject('No such key!') ), clear: (key) => new Promise((resolve, reject) => resolve((cache = {}))), diff --git a/apolloschurchapp/scripts/get-introspection-data.js b/apolloschurchapp/scripts/get-introspection-data.js index 80ae56288..bf60338f6 100755 --- a/apolloschurchapp/scripts/get-introspection-data.js +++ b/apolloschurchapp/scripts/get-introspection-data.js @@ -45,8 +45,9 @@ const getIntrospectionData = async () => { } catch (e) { if (attempts < maxAttempts) { console.log( - `Error writing fragmentTypes (-api probably hasn't started yet). Trying again after wait. Attempt: ${attempts + - 1} of ${maxAttempts}` + `Error writing fragmentTypes (-api probably hasn't started yet). Trying again after wait. Attempt: ${ + attempts + 1 + } of ${maxAttempts}` ); await new Promise((resolve) => setTimeout(resolve, timeBetweenAttempts)); // try again after waiting getIntrospectionData(); diff --git a/apolloschurchapp/src/tabs/index.js b/apolloschurchapp/src/tabs/index.js index 686303360..16e6b4aef 100644 --- a/apolloschurchapp/src/tabs/index.js +++ b/apolloschurchapp/src/tabs/index.js @@ -156,16 +156,13 @@ const TabNavigator = () => { // this is only used by the tab loaded first // if there is a new version of the onboarding flow, // we'll navigate there first to show new screens - useEffect( - () => { - checkOnboardingStatusAndNavigate({ - client, - navigation: NavigationService, - navigateHome: false, - }); - }, - [client] - ); + useEffect(() => { + checkOnboardingStatusAndNavigate({ + client, + navigation: NavigationService, + navigateHome: false, + }); + }, [client]); return ( { const firstName = get(data, 'currentUser.profile.firstName'); const lastName = get(data, 'currentUser.profile.lastName'); - if (loading) return ; - if (!isLoggedIn) return null; + if (loading) { + return ; + } + if (!isLoggedIn) { + return null; + } return (