|
@@ -33,6 +33,8 @@ const BottomTab = createBottomTabNavigator();
|
|
SplashScreen.preventAutoHideAsync();
|
|
SplashScreen.preventAutoHideAsync();
|
|
|
|
|
|
const Route = () => {
|
|
const Route = () => {
|
|
|
|
+ const [token, setToken] = useState<string>('');
|
|
|
|
+
|
|
const [fontsLoaded] = useFonts({
|
|
const [fontsLoaded] = useFonts({
|
|
'redhat-900': require('./assets/fonts/RedHatDisplay-Black-900.ttf'),
|
|
'redhat-900': require('./assets/fonts/RedHatDisplay-Black-900.ttf'),
|
|
'redhat-700': require('./assets/fonts/RedHatDisplay-Bold-700.ttf'),
|
|
'redhat-700': require('./assets/fonts/RedHatDisplay-Bold-700.ttf'),
|
|
@@ -59,13 +61,19 @@ const Route = () => {
|
|
hideSplashScreen();
|
|
hideSplashScreen();
|
|
}, [fontsLoaded, dbLoaded]);
|
|
}, [fontsLoaded, dbLoaded]);
|
|
|
|
|
|
|
|
+ useEffect(() => {
|
|
|
|
+ async function getToken() {
|
|
|
|
+ const tokenStorage = await storageGet('token');
|
|
|
|
+ setToken(tokenStorage as unknown as string);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ getToken();
|
|
|
|
+ }, []);
|
|
|
|
+
|
|
if (!fontsLoaded) {
|
|
if (!fontsLoaded) {
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
|
|
|
|
- let token: string | null = '';
|
|
|
|
- storageGet('token').then((data) => (token = data));
|
|
|
|
-
|
|
|
|
const screenOptions = ({
|
|
const screenOptions = ({
|
|
route
|
|
route
|
|
}: {
|
|
}: {
|