diff options
author | Alexander NeonXP Kiryukhin <a.kiryukhin@mail.ru> | 2019-05-15 03:32:55 +0300 |
---|---|---|
committer | Alexander NeonXP Kiryukhin <a.kiryukhin@mail.ru> | 2019-05-15 03:32:55 +0300 |
commit | 491a92f71cf13bc8ef84db3b7fb24361013afb8e (patch) | |
tree | f4d45203428dcafa0b865e3604f5e9479d2c150b /src/Main.js | |
parent | 0c9db775302d15483385f0621611583e3a2407cd (diff) |
Many fixes
Diffstat (limited to 'src/Main.js')
-rw-r--r-- | src/Main.js | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/src/Main.js b/src/Main.js index 5a67c64..4e5c128 100644 --- a/src/Main.js +++ b/src/Main.js @@ -1,12 +1,14 @@ import React, { Component } from 'react'; -import { Platform, StyleSheet, Text, View } from 'react-native'; +import { View } from 'react-native'; import { connect } from 'redux-su'; +import IconComponent from 'react-native-vector-icons/Ionicons'; import Login from './Components/Login'; import Map from './Components/Map'; import PortalPanel from './Components/PortalPanel'; -import { createStackNavigator, createAppContainer } from 'react-navigation'; +import { createStackNavigator, createBottomTabNavigator, createAppContainer } from 'react-navigation'; +import Settings from './Components/Settings'; -const AppNavigator = createStackNavigator({ +const MapNavigator = createStackNavigator({ Map: { screen: Map, navigationOptions: { @@ -15,12 +17,26 @@ const AppNavigator = createStackNavigator({ }, Portal: { screen: PortalPanel, - navigationOptions: () => ({ - headerMode: 'float', - headerBackTitle: null - }) }, }); + +const AppNavigator = createBottomTabNavigator({ + Map: { + screen: MapNavigator, + navigationOptions: { + tabBarLabel: 'Карта', + tabBarIcon: ({tintColor}) => <IconComponent name={'ios-map'} size={25} color={tintColor} /> + } + }, + Settings: { + screen: Settings, + navigationOptions: { + tabBarLabel: 'Настройки', + tabBarIcon: ({tintColor}) => <IconComponent name={'ios-settings'} size={25} color={tintColor} /> + } + } +}) + const AppContainer = createAppContainer(AppNavigator) class App extends Component { render() { |