forked from llSourcell/ChatGPT_Sports_Betting_Bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
85 lines (81 loc) · 2.42 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
import React from 'react'
import { Provider } from 'react-native-paper'
import { NavigationContainer } from '@react-navigation/native'
import { createStackNavigator } from '@react-navigation/stack'
import { createDrawerNavigator } from '@react-navigation/drawer'
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'
import firebase from 'firebase/compat/app';
import 'firebase/compat/auth';
import { theme } from './src/core/theme'
import {
AuthLoadingScreen,
StartScreen,
LoginScreen,
RegisterScreen,
ResetPasswordScreen,
ProfileScreen,
HomeScreen,
} from './src/screens'
import { FIREBASE_CONFIG } from './src/core/config'
import { HomeIcon, ProfileIcon } from './src/assets/icons'
import DrawerContent from './src/components/DrawerContent'
const Stack = createStackNavigator()
const Drawer = createDrawerNavigator()
const Tab = createBottomTabNavigator()
if (!firebase.apps.length) {
firebase.initializeApp(FIREBASE_CONFIG)
}
export default function App() {
return (
<Provider theme={theme}>
<NavigationContainer>
<Stack.Navigator
initialRouteName="AuthLoadingScreen"
screenOptions={{
headerShown: false,
}}
>
<Stack.Screen
name="AuthLoadingScreen"
component={AuthLoadingScreen}
/>
<Stack.Screen name="StartScreen" component={StartScreen} />
<Stack.Screen name="LoginScreen" component={LoginScreen} />
<Stack.Screen name="RegisterScreen" component={RegisterScreen} />
<Stack.Screen name="Home" component={DrawerNavigator} />
<Stack.Screen
name="ResetPasswordScreen"
component={ResetPasswordScreen}
/>
</Stack.Navigator>
</NavigationContainer>
</Provider>
)
}
function BottomTabNavigator() {
return (
<Tab.Navigator>
<Tab.Screen
name="Home"
component={HomeScreen}
options={{
tabBarIcon: ({ color }) => <HomeIcon fill={color} />,
}}
/>
<Tab.Screen
name="Profile"
component={ProfileScreen}
options={{
tabBarIcon: ({ color }) => <ProfileIcon fill={color} />,
}}
/>
</Tab.Navigator>
)
}
function DrawerNavigator() {
return (
<Drawer.Navigator drawerContent={(props) => <DrawerContent {...props} />}>
<Drawer.Screen name="Home" component={BottomTabNavigator} />
</Drawer.Navigator>
)
}