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';
|
2018-10-04 05:18:36 +03:00
|
|
|
|
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
|
2018-10-13 17:05:42 +03:00
|
|
|
import {
|
2019-01-10 12:05:58 +03:00
|
|
|
Bookmarks,
|
2019-09-04 22:17:39 +03:00
|
|
|
Boost,
|
2019-01-08 15:08:01 +03:00
|
|
|
Drafts,
|
2018-11-01 19:01:19 +03:00
|
|
|
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,
|
2018-11-01 19:01:19 +03:00
|
|
|
Profile,
|
2019-09-04 22:17:39 +03:00
|
|
|
ProfileEdit,
|
|
|
|
Reblogs,
|
2019-09-12 23:01:12 +03:00
|
|
|
Redeem,
|
2019-09-04 22:17:39 +03:00
|
|
|
SearchResult,
|
2018-11-18 01:48:18 +03:00
|
|
|
Settings,
|
2018-11-01 19:01:19 +03:00
|
|
|
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,
|
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
|
|
|
{
|
2019-10-30 23:47:47 +03:00
|
|
|
[ROUTES.SCREENS.FEED]: {
|
2018-10-29 14:30:58 +03:00
|
|
|
screen: BaseNavigator,
|
2018-10-26 15:34:45 +03:00
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
contentComponent: SideMenu,
|
|
|
|
},
|
|
|
|
);
|
|
|
|
|
2019-09-26 00:31:30 +03:00
|
|
|
const stackNavigator = createStackNavigator(
|
2018-10-26 15:34:45 +03:00
|
|
|
{
|
|
|
|
[ROUTES.DRAWER.MAIN]: {
|
|
|
|
screen: mainNavigation,
|
|
|
|
navigationOptions: {
|
|
|
|
header: () => null,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
[ROUTES.SCREENS.PROFILE]: {
|
2019-07-12 11:39:25 +03:00
|
|
|
screen: Profile,
|
2018-10-26 15:34:45 +03:00
|
|
|
navigationOptions: {
|
|
|
|
header: () => null,
|
|
|
|
},
|
|
|
|
},
|
2019-09-04 22:17:39 +03:00
|
|
|
[ROUTES.SCREENS.PROFILE_EDIT]: {
|
|
|
|
screen: ProfileEdit,
|
|
|
|
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]: {
|
2019-07-12 11:39:25 +03:00
|
|
|
screen: Editor,
|
2018-10-05 06:42:27 +03:00
|
|
|
navigationOptions: {
|
|
|
|
header: () => null,
|
|
|
|
},
|
2018-10-04 05:18:36 +03:00
|
|
|
},
|
2018-11-01 19:01:19 +03:00
|
|
|
[ROUTES.SCREENS.VOTERS]: {
|
2019-07-12 11:39:25 +03:00
|
|
|
screen: Voters,
|
2018-11-01 19:01:19 +03:00
|
|
|
navigationOptions: {
|
|
|
|
header: () => null,
|
|
|
|
},
|
|
|
|
},
|
2018-11-16 17:39:16 +03:00
|
|
|
[ROUTES.SCREENS.FOLLOWS]: {
|
2019-07-12 11:39:25 +03:00
|
|
|
screen: Follows,
|
2018-11-16 17:39:16 +03:00
|
|
|
navigationOptions: {
|
|
|
|
header: () => null,
|
|
|
|
},
|
|
|
|
},
|
2018-11-18 01:48:18 +03:00
|
|
|
[ROUTES.SCREENS.SETTINGS]: {
|
2019-07-12 11:39:25 +03:00
|
|
|
screen: Settings,
|
2018-11-18 01:48:18 +03:00
|
|
|
navigationOptions: {
|
|
|
|
header: () => null,
|
|
|
|
},
|
|
|
|
},
|
2019-01-08 15:08:01 +03:00
|
|
|
[ROUTES.SCREENS.DRAFTS]: {
|
2019-07-12 11:39:25 +03:00
|
|
|
screen: Drafts,
|
2019-01-08 15:08:01 +03:00
|
|
|
navigationOptions: {
|
|
|
|
header: () => null,
|
|
|
|
},
|
|
|
|
},
|
2019-01-10 12:05:58 +03:00
|
|
|
[ROUTES.SCREENS.BOOKMARKS]: {
|
2019-07-12 11:39:25 +03:00
|
|
|
screen: Bookmarks,
|
2019-01-10 12:05:58 +03:00
|
|
|
navigationOptions: {
|
|
|
|
header: () => null,
|
|
|
|
},
|
|
|
|
},
|
2019-02-22 13:40:07 +03:00
|
|
|
[ROUTES.SCREENS.SEARCH_RESULT]: {
|
2019-07-12 11:39:25 +03:00
|
|
|
screen: SearchResult,
|
2019-02-22 13:40:07 +03:00
|
|
|
navigationOptions: {
|
|
|
|
header: () => null,
|
|
|
|
},
|
|
|
|
},
|
2019-04-11 12:05:13 +03:00
|
|
|
[ROUTES.SCREENS.TRANSFER]: {
|
2019-07-12 11:39:25 +03:00
|
|
|
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,
|
|
|
|
},
|
|
|
|
},
|
2019-09-12 23:01:12 +03:00
|
|
|
[ROUTES.SCREENS.REDEEM]: {
|
|
|
|
screen: Redeem,
|
2019-07-10 10:28:41 +03:00
|
|
|
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-04 05:18:36 +03:00
|
|
|
},
|
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
|
|
|
|
2018-10-30 00:38:48 +03:00
|
|
|
export default createSwitchNavigator({
|
2019-09-26 00:31:30 +03:00
|
|
|
stackNavigator,
|
2019-07-12 11:39:25 +03:00
|
|
|
[ROUTES.SCREENS.LOGIN]: { screen: Login },
|
|
|
|
[ROUTES.SCREENS.PINCODE]: { screen: PinCode },
|
|
|
|
[ROUTES.SCREENS.STEEM_CONNECT]: { screen: SteemConnect },
|
2018-10-06 06:33:03 +03:00
|
|
|
});
|