-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
executable file
·87 lines (79 loc) · 2.61 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
import React, { useState, useEffect } from "react";
import { NavigationContainer } from "@react-navigation/native";
import { createStackNavigator } from "@react-navigation/stack";
import SuwarHome from "./components/SuwarHome";
import Home from "./components/Home";
import Player from "./components/Player";
import MiniPlayer from "./components/MiniPlayer";
import { Al9ora2Array } from "./arrays/Al9ora2Array";
import { Arr } from "./arrays/Arr";
import { View, Dimensions } from "react-native";
const Stack = createStackNavigator();
export default function App() {
const [audioStatus, setAudioStatus] = useState(false);
const [mo9ri2Key, setMo9ri2Key] = useState(0);
const [suraKey, setSuratKey] = useState(1);
//MiniPlayer:
const [inPlayer, setInPlayer] = useState(false);
const [navigation, setNavigation] = useState(null);
const [sound, setSound] = useState(null);
const [displayMiniPlayer, setDisplayMiniPlayer] = useState(true);
//Curent Riwaya
const [currentRiwaya, setCurrentRiwaya] = useState(0);
// useEffect(() => {
// console.log(audioStatus);
// });
return (
<NavigationContainer
style={{ minHeight: Math.round(Dimensions.get("window").height) }}
>
<Stack.Navigator headerMode={false}>
<Stack.Screen name="Home">
{(props) => (
<Home
{...props}
setMo9ri2Key={setMo9ri2Key}
setNavigation={setNavigation}
setDisplayMiniPlayer={setDisplayMiniPlayer}
/>
)}
</Stack.Screen>
<Stack.Screen name="SuwarHome">
{(props) => (
<SuwarHome
{...props}
setSuratKey={setSuratKey}
mo9ri2={Arr[mo9ri2Key]}
setDisplayMiniPlayer={setDisplayMiniPlayer}
/>
)}
</Stack.Screen>
<Stack.Screen name="Player">
{(props) => (
<Player
{...props}
audioStatus={audioStatus}
setAudioStatus={setAudioStatus}
setInPlayer={setInPlayer}
suraKey={suraKey}
mo9ri2={Arr[mo9ri2Key]}
setSuratKey={setSuratKey}
setSound={setSound}
currentRiwaya={currentRiwaya}
/>
)}
</Stack.Screen>
</Stack.Navigator>
<MiniPlayer
sound={sound}
suraKey={suraKey}
inPlayer={inPlayer}
mo9ri2Key={mo9ri2Key}
navigation={navigation}
audioStatus={audioStatus}
setAudioStatus={setAudioStatus}
displayMiniPlayer={displayMiniPlayer}
/>
</NavigationContainer>
);
}