-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathApp.js
63 lines (48 loc) · 1.96 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
import React from 'react';
import Signup from './src/screens/Signup';
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import Login from './src/screens/Login';
import Home from './src/screens/Home';
import Main from './src/screens/Main';
import Create from './src/screens/Create'
import Precreate from './src/screens/Precreate';
import Postcreate from './src/screens/Postcreate';
import {Provider} from 'react-redux';
import {createStore, applyMiddleware} from 'redux';
import allReducers from './src/redux/reducers';
import Tab from './src/screens/Tab';
import Dashboard from './src/screens/Dashboard'
import Join from './src/screens/Join';
import Webview from './src/screens/Webview';
import Profilepic from './src/screens/Profilepic';
import Coverpic from './src/screens/Coverpic';
const Stack = createStackNavigator();
const screens = [
{ name: "Main", component: Main },
{ name: "Login", component: Login },
{ name: "Signup", component: Signup },
{ name: "Home", component: Home },
{name: "Create", component: Create},
{name: "Precreate", component: Precreate},
{name: "Postcreate", component: Postcreate},
{name: "Dashboard", component: Dashboard},
{name: "Tab", component: Tab},
{name: "Join", component: Join},
{name: "Webview", component: Webview},
{name: 'Profilepic', component: Profilepic},
{name: 'Coverpic', component: Coverpic},
];
const store = createStore(allReducers);
export default function App() {
return(
<Provider store={store}>
{/* <View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}><Text>Hello World</Text></View> */}
<NavigationContainer>
<Stack.Navigator initialRouteName={screens[0].name} screenOptions={{ headerShown: false }}>
{screens.map(({ name, component }) => <Stack.Screen key={name} name={name} component={component} />)}
</Stack.Navigator>
</NavigationContainer>
</Provider>
);
}