ecency-mobile/src/navigation/routes.js

160 lines
3.2 KiB
JavaScript
Raw Normal View History

2019-10-04 18:56:22 +03:00
import { createSwitchNavigator } from 'react-navigation';
import { createDrawerNavigator } from 'react-navigation-drawer';
import { createStackNavigator } from 'react-navigation-stack';
2019-10-04 18:56:22 +03:00
import { BaseNavigator } from './baseNavigator';
import ROUTES from '../constants/routeNames';
2018-10-05 06:42:27 +03:00
// Screens
import {
Bookmarks,
2019-09-04 22:17:39 +03:00
Boost,
Drafts,
Editor,
2018-11-18 01:48:18 +03:00
Follows,
2019-10-04 00:27:50 +03:00
SpinGame,
2018-10-31 11:54:33 +03:00
Login,
PinCode,
Post,
Profile,
2019-09-04 22:17:39 +03:00
ProfileEdit,
Reblogs,
Redeem,
2019-09-04 22:17:39 +03:00
SearchResult,
2018-11-18 01:48:18 +03:00
Settings,
SteemConnect,
2019-04-11 12:05:13 +03:00
Transfer,
2019-09-04 22:17:39 +03:00
Voters,
2019-12-08 18:39:13 +03:00
Comments,
} 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.FEED]: {
screen: BaseNavigator,
},
},
{
contentComponent: SideMenu,
},
);
2019-09-26 00:31:30 +03:00
const stackNavigator = createStackNavigator(
{
[ROUTES.DRAWER.MAIN]: {
screen: mainNavigation,
navigationOptions: {
header: () => null,
},
},
[ROUTES.SCREENS.PROFILE]: {
screen: Profile,
navigationOptions: {
header: () => null,
},
},
2019-09-04 22:17:39 +03:00
[ROUTES.SCREENS.PROFILE_EDIT]: {
screen: ProfileEdit,
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.REDEEM]: {
screen: Redeem,
navigationOptions: {
header: () => null,
},
},
2019-08-12 13:03:48 +03:00
[ROUTES.SCREENS.REBLOGS]: {
screen: Reblogs,
2019-07-26 23:06:52 +03:00
navigationOptions: {
header: () => null,
},
},
2019-10-04 00:27:50 +03:00
[ROUTES.SCREENS.SPIN_GAME]: {
screen: SpinGame,
2019-08-04 21:32:00 +03:00
navigationOptions: {
header: () => null,
},
},
2019-12-08 18:39:13 +03:00
[ROUTES.SCREENS.COMMENTS]: {
screen: Comments,
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({
2019-09-26 00:31:30 +03:00
stackNavigator,
[ROUTES.SCREENS.LOGIN]: { screen: Login },
[ROUTES.SCREENS.PINCODE]: { screen: PinCode },
[ROUTES.SCREENS.STEEM_CONNECT]: { screen: SteemConnect },
2018-10-06 06:33:03 +03:00
});