forked from applerdotxyz/rn-composable-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
63 lines (57 loc) · 1.87 KB
/
App.tsx
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 { default as React, FunctionComponent } from "react";
import { StatusBar, View } from "react-native";
import { persistStore } from "redux-persist";
import { Navigator } from "./src/Navigator";
import { configureStore } from "./src/state-mgmt/store"; //Import the store
import { Provider as ReduxProvider } from "react-redux";
import { NavigationContainer } from "@react-navigation/native";
import { ListEntities } from "./src/pages/components/ListEntities";
import { createStackNavigator } from "@react-navigation/stack";
import UiX from "./src/UIconfigurator/UIx";
const store = configureStore();
const persistor = persistStore(store);
// routeConfig
// TODO: bring from anywhere you wish
export const routes = {
Index: "Index",
Alternate: "Alternate",
Test: "Test",
First: "First",
AddEditEntity: "AddEditEntity",
ListEntities: "ListEntities",
ShowEntity: "ShowEntity",
MainApp: "MainApp",
DashboardApp: "DashboardApp",
OrderLineView: "OrderLineView",
OneMoreApp: "OneMoreApp",
// Index: require(`./src/pages/Index`).default,
// Alternate: require(`./src/pages/Alternate`).default,
// Test: require(`./src/pages/Test`).default,
// First: require(`./src/pages/First`).default,
};
const Stack = createStackNavigator();
// main wrapper component
const App: FunctionComponent = () => (
<>
<StatusBar
backgroundColor={"#FFFFFF"}
barStyle="light-content"
hidden={false}
/>
<View style={{ flex: 1 }}>
<ReduxProvider store={store}>
<Navigator routes={routes} />
</ReduxProvider>
{/* <ReduxProvider store={store}>
<NavigationContainer>
<Stack.Navigator>
<Stack.Screen name="ListEntities" >
{({route, navigation}) => <UiX idx={`ListEntities`} />}
</Stack.Screen>
</Stack.Navigator>
</NavigationContainer>
</ReduxProvider> */}
</View>
</>
);
export default App;