2018-10-30 00:38:48 +03:00
|
|
|
import {
|
|
|
|
createDrawerNavigator,
|
|
|
|
createSwitchNavigator,
|
|
|
|
createStackNavigator,
|
|
|
|
} from 'react-navigation';
|
2018-10-05 01:27:32 +03:00
|
|
|
import { BaseNavigator } from '../navigation';
|
2018-10-09 02:18:00 +03:00
|
|
|
import { default as ROUTES } from '../constants/routeNames';
|
2018-10-04 05:18:36 +03:00
|
|
|
|
2018-10-05 06:42:27 +03:00
|
|
|
// Screens
|
2018-10-13 17:05:42 +03:00
|
|
|
import {
|
2018-10-31 11:54:33 +03:00
|
|
|
Splash,
|
|
|
|
Login,
|
|
|
|
PinCode,
|
|
|
|
SteemConnect,
|
|
|
|
Editor,
|
|
|
|
Profile,
|
|
|
|
Post,
|
|
|
|
RootComponent,
|
2018-10-13 17:05:42 +03:00
|
|
|
} from '../screens';
|
2018-10-04 05:18:36 +03:00
|
|
|
|
2018-10-05 06:42:27 +03:00
|
|
|
// Components
|
|
|
|
import { SideMenu } from '../components';
|
|
|
|
|
2018-10-30 00:38:48 +03:00
|
|
|
const mainNavigation = createDrawerNavigator(
|
2018-10-05 06:42:27 +03:00
|
|
|
{
|
2018-10-09 02:18:00 +03:00
|
|
|
[ROUTES.SCREENS.HOME]: {
|
2018-10-29 14:30:58 +03:00
|
|
|
screen: BaseNavigator,
|
2018-10-26 15:34:45 +03:00
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
contentComponent: SideMenu,
|
|
|
|
},
|
|
|
|
);
|
|
|
|
|
|
|
|
const stackNavigatior = createStackNavigator(
|
|
|
|
{
|
|
|
|
[ROUTES.DRAWER.MAIN]: {
|
|
|
|
screen: mainNavigation,
|
|
|
|
navigationOptions: {
|
|
|
|
header: () => null,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
[ROUTES.SCREENS.PROFILE]: {
|
2018-10-30 18:43:58 +03:00
|
|
|
screen: RootComponent()(Profile),
|
2018-10-26 15:34:45 +03:00
|
|
|
navigationOptions: {
|
|
|
|
header: () => null,
|
|
|
|
},
|
|
|
|
},
|
2018-10-29 16:29:29 +03:00
|
|
|
[ROUTES.SCREENS.POST]: {
|
|
|
|
screen: Post,
|
|
|
|
navigationOptions: {
|
|
|
|
header: () => null,
|
|
|
|
},
|
|
|
|
},
|
2018-10-26 15:34:45 +03:00
|
|
|
[ROUTES.SCREENS.EDITOR]: {
|
2018-10-30 18:43:58 +03:00
|
|
|
screen: RootComponent()(Editor),
|
2018-10-05 06:42:27 +03:00
|
|
|
navigationOptions: {
|
|
|
|
header: () => null,
|
|
|
|
},
|
2018-10-04 05:18:36 +03:00
|
|
|
},
|
|
|
|
},
|
2018-10-05 06:42:27 +03:00
|
|
|
{
|
2018-10-26 15:34:45 +03:00
|
|
|
cardStyle: {
|
|
|
|
backgroundColor: 'white',
|
|
|
|
},
|
2018-10-05 06:42:27 +03:00
|
|
|
},
|
|
|
|
);
|
2018-10-06 06:33:03 +03:00
|
|
|
|
2018-10-30 00:38:48 +03:00
|
|
|
export default createSwitchNavigator({
|
2018-10-26 15:34:45 +03:00
|
|
|
stackNavigatior,
|
2018-10-28 00:44:25 +03:00
|
|
|
[ROUTES.SCREENS.LOGIN]: { screen: RootComponent()(Login) },
|
|
|
|
[ROUTES.SCREENS.PINCODE]: { screen: RootComponent()(PinCode) },
|
2018-10-30 17:24:27 +03:00
|
|
|
[ROUTES.SCREENS.SPLASH]: { screen: Splash },
|
2018-10-28 00:44:25 +03:00
|
|
|
[ROUTES.SCREENS.STEEM_CONNECT]: { screen: RootComponent()(SteemConnect) },
|
2018-10-06 06:33:03 +03:00
|
|
|
});
|