2018-10-30 00:38:48 +03:00
|
|
|
import {
|
|
|
|
createDrawerNavigator,
|
|
|
|
createSwitchNavigator,
|
|
|
|
createStackNavigator,
|
|
|
|
} from 'react-navigation';
|
2018-12-21 11:13:02 +03:00
|
|
|
import { BaseNavigator } from './baseNavigator';
|
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 {
|
2019-01-10 12:05:58 +03:00
|
|
|
Bookmarks,
|
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,
|
2018-10-31 11:54:33 +03:00
|
|
|
Login,
|
|
|
|
PinCode,
|
|
|
|
Post,
|
2018-11-01 19:01:19 +03:00
|
|
|
Profile,
|
2018-11-18 01:48:18 +03:00
|
|
|
Settings,
|
2018-11-01 19:01:19 +03:00
|
|
|
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,
|
2019-07-10 10:28:41 +03:00
|
|
|
Promote,
|
2019-07-26 23:06:52 +03:00
|
|
|
BoostPost,
|
2019-08-04 21:32:00 +03:00
|
|
|
FreeEstm,
|
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]: {
|
2019-07-12 11:39:25 +03:00
|
|
|
screen: 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]: {
|
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-07-10 10:28:41 +03:00
|
|
|
[ROUTES.SCREENS.PROMOTE]: {
|
2019-07-18 10:31:17 +03:00
|
|
|
screen: Promote,
|
2019-07-10 10:28:41 +03:00
|
|
|
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-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({
|
2018-10-26 15:34:45 +03:00
|
|
|
stackNavigatior,
|
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
|
|
|
});
|