-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
44 lines (37 loc) · 1.32 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
import React from 'react'
import { createAppContainer} from 'react-navigation';
import { createStackNavigator } from 'react-navigation-stack';
import CandidatesScreen from './src/screens/CandidatesScreen'
import NationalIDScreen from './src/screens/NationalIDScreen'
import FingerPrintScreen from './src/screens/FingerPrintScreen'
import SigninScreen from './src/screens/SigninScreen'
import OTPScreen from './src/screens/OTPScreen'
import {Provider as AuthProvider} from './src/context/AuthContext'
import {Provider as VotingProvider} from './src/context/VoteContext'
import SignUpScreen from './src/screens/SignUpScreen'
import {setNavigator} from './src/navigationRef'
import CandidateInfoScreen from './src/screens/CandidateInfoScreen';
import VotesResultsScreen from './src/screens/VotesResultsScreen'
const navigator=createStackNavigator({
Signup:SignUpScreen,
Signin:SigninScreen,
NationalID:NationalIDScreen,
Candidates:CandidatesScreen,
OTP:OTPScreen,
FingerPrint:FingerPrintScreen,
CandidateInfo:CandidateInfoScreen,
VotesResults:VotesResultsScreen
},
{
initialRouteName:'Signin'
});
const App= createAppContainer(navigator);
export default ()=>{
return(
<AuthProvider>
<VotingProvider>
<App ref={(navigator)=>setNavigator(navigator)}/>
</VotingProvider>
</AuthProvider>
)
}