|
import React from 'react' |
|
import { |
|
createStackNavigator, |
|
createAppContainer, |
|
createBottomTabNavigator |
|
} from 'react-navigation' |
|
import { Reg, Settings, Wallet, Send, Recieve, History, Scan } from './screens' |
|
import { ButtonTab } from './components' |
|
import SettingsPassword from './screens/Settings/SettingsPassword' |
|
import SendMain from './screens/Send/SendMain' |
|
import ScanMain from './screens/Scan/ScanMain' |
|
|
|
const AppNavigator = createStackNavigator( |
|
{ |
|
REG: { screen: Reg }, |
|
SETTINGS: { screen: Settings }, |
|
SETTINGS_PASSWORD: { screen: SettingsPassword }, |
|
SCAN_MAIN: { screen: ScanMain }, |
|
SEND_MAIN: { screen: SendMain }, |
|
MAIN: { |
|
screen: createBottomTabNavigator( |
|
{ |
|
Wallet: { |
|
screen: Wallet, |
|
navigationOptions: { |
|
tabBarIcon: ({ tintColor }) => ( |
|
<ButtonTab name='wallet' tintColor={tintColor} /> |
|
) |
|
} |
|
}, |
|
Send: { |
|
screen: Send, |
|
navigationOptions: { |
|
tabBarIcon: ({ tintColor }) => ( |
|
<ButtonTab name='send' tintColor={tintColor} /> |
|
) |
|
} |
|
}, |
|
Scan: { |
|
screen: Scan, |
|
navigationOptions: { |
|
tabBarIcon: () => <ButtonTab name='scan' mainTab /> |
|
} |
|
}, |
|
Recieve: { |
|
screen: Recieve, |
|
navigationOptions: { |
|
tabBarIcon: ({ tintColor }) => ( |
|
<ButtonTab name='recieve' tintColor={tintColor} /> |
|
) |
|
} |
|
}, |
|
History: { |
|
screen: History, |
|
navigationOptions: { |
|
tabBarIcon: ({ tintColor }) => ( |
|
<ButtonTab name='history' tintColor={tintColor} /> |
|
) |
|
} |
|
} |
|
}, |
|
{ |
|
initialRouteName: 'History', |
|
tabBarOptions: { |
|
showLabel: false, |
|
activeTintColor: '#2B50D4' |
|
} |
|
} |
|
) |
|
} |
|
}, |
|
{ |
|
initialRouteName: 'MAIN', |
|
headerMode: 'none' |
|
} |
|
) |
|
|
|
export default createAppContainer(AppNavigator) |