-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
113 lines (107 loc) · 3.13 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
import React ,{useEffect , useState} from 'react';
import { View , StyleSheet } from 'react-native';
import { createStackNavigator , TransitionPresets } from "@react-navigation/stack";
import { NavigationContainer } from '@react-navigation/native';
import Tabs from "./navigation/tabs";
import Header from './src/components/Header';
import Listen from './screens/Listen';
import Surah from './screens/Surah';
import Azkar from './screens/Azkar';
import Imsakyah from './screens/Imsakyah';
import Read from "./screens/Read"
import TrackPlayer ,{ Capability, State ,useProgress } from 'react-native-track-player';
import SplashScreen from 'react-native-splash-screen';
const Stack = createStackNavigator();
const App = () => {
const setupTP = async() =>{
SplashScreen.hide()
await TrackPlayer.setupPlayer()
return TrackPlayer.destroy()
}
useEffect(()=>{
setupTP()
}, [])
return (
<View style={{flex:1}}>
<NavigationContainer>
<Stack.Navigator
screenOptions={{
headerShown: true,
...TransitionPresets.SlideFromRightIOS
}}
initialRouteName={'Tabs'}
>
<Stack.Screen
name="Tabs"
component={Tabs}
options={{headerTitle: (props) => <Header {...props}/> ,
headerStyle :{
backgroundColor:"white"
},
headerTintColor:"#1C8D2F" ,
headerTitleStyle:{color:"white"} ,
...TransitionPresets.SlideFromRightIOS,
}}
/>
<Stack.Screen
name='Listen'
component={Listen}
options={{headerTitle: (props) => <Header {...props}/> ,
headerStyle :{
backgroundColor:"white"
},
headerTintColor:"#1C8D2F" ,
headerTitleStyle:{color:"white"} ,
}}
/>
<Stack.Screen
name='Imsakyah'
component={Imsakyah}
options={{headerTitle: (props) => <Header {...props}/> ,
headerStyle :{
backgroundColor:"white"
},
headerTintColor:"#1C8D2F" ,
headerTitleStyle:{color:"white"} ,
}}
/>
<Stack.Screen
name='Read'
component={Read}
options={{headerTitle: (props) => <Header {...props}/> ,
headerStyle :{
backgroundColor:"white"
},
headerTintColor:"#1C8D2F" ,
headerTitleStyle:{color:"white"} ,
}}
/>
<Stack.Screen
name='Surah'
component={Surah}
options={{headerTitle: (props) => <Header {...props}/> ,
headerStyle :{
backgroundColor:"white"
},
headerTintColor:"#1C8D2F" ,
headerTitleStyle:{color:"white"} ,
}}
/>
<Stack.Screen
name='Azkar'
component={Azkar}
options={{headerTitle: (props) => <Header {...props}/> ,
headerStyle :{
backgroundColor:"white"
},
headerTintColor:"#1C8D2F" ,
headerTitleStyle:{color:"white"} ,
}}
/>
</Stack.Navigator>
</NavigationContainer>
</View>
)
}
const styles = StyleSheet.create({})
export default App;