-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.ios.js
66 lines (62 loc) · 2.58 KB
/
index.ios.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
import React, {Component} from "react";
import LinearGradient from "react-native-linear-gradient";
import { StackNavigator } from "react-navigation";
import { NativeRouter, Route, Link } from "react-router-native";
import createMemoryHistory from "history/createMemoryHistory";
import { Switch } from "react-router";
import App from "./components/App.js";
import Dash from "./components/routes/Dash.js";
import PlanogramOverviewRoute from "./components/routes/PlanogramOverviewRoute.js";
import PlanogramEditorRoute from "./components/routes/PlanogramEditorRoute.js";
import ProductListRoute from "./components/routes/ProductListRoute.js";
import ProductDetailRoute from "./components/routes/ProductDetailRoute.js";
import NewDirectoryRoute from "./components/routes/NewDirectoryRoute.js";
import SignUpRoute from "./components/routes/SignUpRoute.js";
import NavBar from "./components/shared/NavBar.js";
import { AppRegistry, View, StyleSheet, StatusBar } from "react-native";
import { Alert } from "react-native";
import UserService from "./services/UserService.js";
import { Provider } from "react-redux";
import configureStore from "./store/createStore";
let history = createMemoryHistory({
initialEntries: [ "/" ],
initialIndex: 0,
keyLength: 6,
getUserConfirmation: null
});
export default class Companion2 extends Component {
render() {
return (
<View style={styles.container}>
<StatusBar
backgroundColor = "blue"
barStyle = "light-content"
/>
<Provider store={configureStore()}>
<NativeRouter addressBar history={history}>
<View style={{flex: 1}}>
<Switch>
<Route exact path="/" component={App}/>
<Route path="/signup" component={SignUpRoute}/>
<Route path="/dash" component={Dash}/>
<Route path="/planogramoverview" component={PlanogramOverviewRoute}/>
<Route path="/planogrameditor" component={PlanogramEditorRoute}/>
<Route path="/newdirectory" component={NewDirectoryRoute}/>
</Switch>
<NavBar />
</View>
</NativeRouter>
</Provider>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
width: "100%",
justifyContent: "center",
alignItems: "center",
}
});
AppRegistry.registerComponent("spaceage", () => Companion2);