forked from CraftAcademy/co_ping_mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
88 lines (78 loc) · 2.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
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
import "react-native-gesture-handler"
import * as React from "react"
import { Provider } from "react-redux"
import configureStore from "state/store/configureStore"
import axios from "axios"
import TripsList from "screens/TripsList"
import { NavigationContainer } from "@react-navigation/native"
import { createStackNavigator } from "@react-navigation/stack"
import Requests from "screens/Requests"
import TripDetails from "screens/TripDetails"
import RequestDetails from "screens/RequestDetails"
import SignUp from "screens/SignUp"
import UserProfile from "screens/UserProfile"
import HomeScreen from "screens/HomeScreen"
axios.defaults.baseURL = "https://co-ping.herokuapp.com"
const store = configureStore()
window.store = store
const Stack = createStackNavigator()
const invisibleHeader = {
headerTransparent: true,
headerStyle: { borderBottomWidth: 0 },
headerTintColor: "#fff",
headerTitleStyle: {
fontWeight: "normal",
},
title: ""
}
const App = () => {
return (
<NavigationContainer>
<Provider store={store}>
<Stack.Navigator>
<Stack.Screen
name="Home"
nativeID="home"
component={HomeScreen}
path=""
options={invisibleHeader}
/>
<Stack.Screen
name="Trips"
component={TripsList}
options={invisibleHeader}
/>
<Stack.Screen
name="Requests"
component={Requests}
options={invisibleHeader}
/>
<Stack.Screen
name="My Ping Board"
component={TripDetails}
options={invisibleHeader}
/>
<Stack.Screen
name="My Pong Board"
component={RequestDetails}
options={invisibleHeader}
/>
<Stack.Screen
name="Sign up"
component={SignUp}
options={invisibleHeader}
/>
<Stack.Screen
name="My Profile"
component={UserProfile}
options={invisibleHeader}
/>
</Stack.Navigator>
</Provider>
</NavigationContainer>
)
}
if (window.Cypress) {
window.store = store
}
export default App