-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
35 lines (31 loc) · 1.19 KB
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, Image, View, Animated } from 'react-native';
import React, {useRef, useEffect, useState} from 'react';
import FadeScreen from './src/screens/FadeScreen';
import AboutUsScreen from './src/screens/AboutUs';
import HomeScreen from './src/screens/HomeScreen';
import { createNativeStackNavigator } from "@react-navigation/native-stack";
import { NavBarStack } from './src/navigation/NavigationBarStack';
import { NavigationContainer } from '@react-navigation/native';
//streamURL will hold the Radio Stream link and we can reference this later...
const streamUrl = 'https://securestreams4.autopo.st:1643/';
export default function App() {
const [loading, setloading] = useState(true);
useEffect(() => {
var delayInMilliseconds = 5000; //1 second
setTimeout(function() {
//your code to be executed after 1 second
setloading(false);
}, delayInMilliseconds);
}, [])
return (
<NavigationContainer>
{loading ? (
<FadeScreen/>
) : (
<NavBarStack />
)}
</NavigationContainer>
);
}
//On line 25 switch HomeScreen to AboutUsScreen or add button (dropdown) to navigate/view to AboutUsScreen