|
1 | 1 | import React from 'react'; |
2 | | -import { Provider } from 'react-redux'; |
3 | 2 | import { bindActionCreators } from 'redux'; |
| 3 | +import { Provider } from 'react-redux'; |
| 4 | +import { StackNavigator } from 'react-navigation'; |
4 | 5 |
|
5 | | -import App from './src/App'; |
6 | | -import initStore from './src/App/store'; |
7 | | -import NativeRoutes from './src/App/routes/index.native'; |
8 | | -import setupAxiosInterceptors from './src/App/shared/interceptors/axios.interceptor'; |
9 | 6 | import { clearAuthentication } from './src/App/shared/actions/auth.action'; |
10 | | -import { setContainer } from './src/App/routes/utils.native'; |
| 7 | +import setupAxiosInterceptors from './src/App/shared/interceptors/axios.interceptor'; |
| 8 | +import initStore from './src/App/store'; |
| 9 | +// Screens |
| 10 | +import App from './src/App'; |
| 11 | +import Dashboard from './src/App/features/Home/components/Dashboard'; |
| 12 | + |
| 13 | +const RootStack = StackNavigator( |
| 14 | + { |
| 15 | + App, |
| 16 | + Dashboard |
| 17 | + }, |
| 18 | + { |
| 19 | + initialRouteName: 'App' |
| 20 | + } |
| 21 | +); |
11 | 22 |
|
12 | 23 | const store = initStore(); |
13 | 24 | const actions = bindActionCreators({ clearAuthentication }, store.dispatch); |
14 | 25 | setupAxiosInterceptors(() => actions.clearAuthentication('error.http.403')); |
15 | 26 |
|
16 | | -export default class NativeApp extends App { |
| 27 | +export default class NativeApp extends React.Component { |
17 | 28 | render() { |
18 | 29 | return ( |
19 | 30 | <Provider store={store}> |
20 | | - <NativeRoutes |
21 | | - ref={(navigatorRef: any) => { |
22 | | - setContainer(navigatorRef); |
23 | | - }} |
24 | | - /> |
| 31 | + <RootStack /> |
25 | 32 | </Provider> |
26 | 33 | ); |
27 | 34 | } |
28 | 35 | } |
| 36 | +// Disable the Yellow Box |
| 37 | +console.ignoredYellowBox = ['Warning:']; |
0 commit comments