diff --git a/package.json b/package.json index 1c43253..a7bd2b4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "storefrontapp", - "version": "0.0.9", + "version": "0.0.10", "private": true, "scripts": { "android": "react-native run-android", diff --git a/src/features/Core/screens/BootScreen.js b/src/features/Core/screens/BootScreen.js index ad1cc4a..7de2992 100644 --- a/src/features/Core/screens/BootScreen.js +++ b/src/features/Core/screens/BootScreen.js @@ -1,16 +1,12 @@ +import SetupWarningScreen from 'exceptions/SetupWarningScreen'; +import { useStorefront } from 'hooks'; import React, { useEffect, useState } from 'react'; -import { SafeAreaView, View, ActivityIndicator } from 'react-native'; -import { initStripe } from '@stripe/stripe-react-native'; +import { ActivityIndicator, SafeAreaView, View } from 'react-native'; +import RNBootSplash from 'react-native-bootsplash'; +import { tailwind } from 'tailwind'; import { hasRequiredKeys, logError } from 'utils'; -import { useStorefront } from 'hooks'; -import { set } from 'utils/Storage'; import { setI18nConfig } from 'utils/Localize'; -import { tailwind } from 'tailwind'; -import RNBootSplash from 'react-native-bootsplash'; -import SetupWarningScreen from 'exceptions/SetupWarningScreen'; -import config from 'config'; - -const { STRIPE_KEY, APP_IDENTIFIER } = config; +import { set } from 'utils/Storage'; /** * BootScreen is a simple initialization screen, will load @@ -37,32 +33,34 @@ const BootScreen = ({ navigation }) => { // Initialize i18n setI18nConfig(); - // Fetch the about() information - storefront - .about() - .then((info) => { - // Store storefront/network info - set('info', info); + useEffect(() => { + // Fetch the about() information + storefront + .about() + .then((info) => { + // Store storefront/network info + set('info', info); - // if is single store only go to storefront screens - if (info.is_store) { - return navigation.navigate('StorefrontScreen', { info }); - } + // if is single store only go to storefront screens + if (info.is_store) { + return navigation.navigate('StorefrontScreen', { info }); + } - // if is network/multi-vendor - if (info.is_network) { - return navigation.navigate('NetworkScreen', { info }); - } - }) - .catch((error) => { - setError(error); - logError(error, '[ Error fetching storefront info! ]'); - }) - .finally(() => { - setTimeout(() => { - RNBootSplash.hide(); - }, 300); - }); + // if is network/multi-vendor + if (info.is_network) { + return navigation.navigate('NetworkScreen', { info }); + } + }) + .catch((error) => { + setError(error); + logError(error, '[ Error fetching storefront info! ]'); + }) + .finally(() => { + setTimeout(() => { + RNBootSplash.hide(); + }, 300); + }); + }, []); if (error) { return ;