From 072fa04314a73c8b1c9d0834db0c8278a80ca2d1 Mon Sep 17 00:00:00 2001 From: mehmet-erim Date: Tue, 17 Mar 2020 13:41:55 +0300 Subject: [PATCH] refactor: remove promise all from AppContainer --- .../src/components/AppContainer/AppContainer.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/templates/app/react-native/src/components/AppContainer/AppContainer.js b/templates/app/react-native/src/components/AppContainer/AppContainer.js index d07b692466..7983d0cab3 100644 --- a/templates/app/react-native/src/components/AppContainer/AppContainer.js +++ b/templates/app/react-native/src/components/AppContainer/AppContainer.js @@ -53,13 +53,11 @@ function AppContainer({ language, fetchAppConfig, token, setToken }) { useEffect(() => { fetchAppConfig(); - Promise.all([ - Font.loadAsync({ - Roboto: require('native-base/Fonts/Roboto.ttf'), - Roboto_medium: require('native-base/Fonts/Roboto_medium.ttf'), - ...Ionicons.font, - }), - ]).then(() => setIsReady(true)); + Font.loadAsync({ + Roboto: require('native-base/Fonts/Roboto.ttf'), + Roboto_medium: require('native-base/Fonts/Roboto_medium.ttf'), + ...Ionicons.font, + }).then(() => setIsReady(true)); }, []); return (