ecency-mobile/src/navigation/routes.js

148 lines
2.8 KiB
JavaScript
Raw Normal View History

import {
createDrawerNavigator,
createSwitchNavigator,
createStackNavigator,
} from 'react-navigation';
import { BaseNavigator } from './baseNavigator';
import { default as ROUTES } from '../constants/routeNames';
2018-10-05 06:42:27 +03:00
// Screens
import {
Bookmarks,
Drafts,
Editor,
2018-11-18 01:48:18 +03:00
Follows,
2018-10-31 11:54:33 +03:00
Login,
PinCode,
Post,
Profile,
2018-11-18 01:48:18 +03:00
Settings,
SteemConnect,
Voters,
2019-02-22 13:40:07 +03:00
SearchResult,
2019-04-11 12:05:13 +03:00
Transfer,
2019-06-27 23:45:57 +03:00
Boost,
Promote,
2019-07-26 23:06:52 +03:00
BoostPost,
2019-08-04 21:32:00 +03:00
FreeEstm,
} from '../screens';
2018-10-05 06:42:27 +03:00
// Components
import { SideMenu } from '../components';
const mainNavigation = createDrawerNavigator(
2018-10-05 06:42:27 +03:00
{
[ROUTES.SCREENS.HOME]: {
screen: BaseNavigator,
},
},
{
contentComponent: SideMenu,
},
);
const stackNavigatior = createStackNavigator(
{
[ROUTES.DRAWER.MAIN]: {
screen: mainNavigation,
navigationOptions: {
header: () => null,
},
},
[ROUTES.SCREENS.PROFILE]: {
screen: Profile,
navigationOptions: {
header: () => null,
},
},
[ROUTES.SCREENS.POST]: {
screen: Post,
navigationOptions: {
header: () => null,
},
},
[ROUTES.SCREENS.EDITOR]: {
screen: Editor,
2018-10-05 06:42:27 +03:00
navigationOptions: {
header: () => null,
},
},
[ROUTES.SCREENS.VOTERS]: {
screen: Voters,
navigationOptions: {
header: () => null,
},
},
2018-11-16 17:39:16 +03:00
[ROUTES.SCREENS.FOLLOWS]: {
screen: Follows,
2018-11-16 17:39:16 +03:00
navigationOptions: {
header: () => null,
},
},
2018-11-18 01:48:18 +03:00
[ROUTES.SCREENS.SETTINGS]: {
screen: Settings,
2018-11-18 01:48:18 +03:00
navigationOptions: {
header: () => null,
},
},
[ROUTES.SCREENS.DRAFTS]: {
screen: Drafts,
navigationOptions: {
header: () => null,
},
},
[ROUTES.SCREENS.BOOKMARKS]: {
screen: Bookmarks,
navigationOptions: {
header: () => null,
},
},
2019-02-22 13:40:07 +03:00
[ROUTES.SCREENS.SEARCH_RESULT]: {
screen: SearchResult,
2019-02-22 13:40:07 +03:00
navigationOptions: {
header: () => null,
},
},
2019-04-11 12:05:13 +03:00
[ROUTES.SCREENS.TRANSFER]: {
screen: Transfer,
2019-04-11 12:05:13 +03:00
navigationOptions: {
header: () => null,
},
},
2019-06-27 23:45:57 +03:00
[ROUTES.SCREENS.BOOST]: {
screen: Boost,
navigationOptions: {
header: () => null,
},
},
[ROUTES.SCREENS.PROMOTE]: {
screen: Promote,
navigationOptions: {
header: () => null,
},
},
2019-07-26 23:06:52 +03:00
[ROUTES.SCREENS.BOOST_POST]: {
screen: BoostPost,
navigationOptions: {
header: () => null,
},
},
2019-08-04 21:32:00 +03:00
[ROUTES.SCREENS.FREE_ESTM]: {
screen: FreeEstm,
navigationOptions: {
header: () => null,
},
},
},
2018-10-05 06:42:27 +03:00
{
2018-12-14 19:37:35 +03:00
headerMode: 'none',
2018-10-05 06:42:27 +03:00
},
);
2018-10-06 06:33:03 +03:00
export default createSwitchNavigator({
stackNavigatior,
[ROUTES.SCREENS.LOGIN]: { screen: Login },
[ROUTES.SCREENS.PINCODE]: { screen: PinCode },
[ROUTES.SCREENS.STEEM_CONNECT]: { screen: SteemConnect },
2018-10-06 06:33:03 +03:00
});