|
@@ -5,11 +5,11 @@
|
|
* <dev@clicknpush.ca>, January 2022
|
|
* <dev@clicknpush.ca>, January 2022
|
|
*/
|
|
*/
|
|
|
|
|
|
-import { FontAwesome } from '@expo/vector-icons';
|
|
|
|
|
|
+import { FontAwesome, SimpleLineIcons } from '@expo/vector-icons';
|
|
import { BottomTabNavigationOptions, BottomTabNavigationProp, createBottomTabNavigator } from "@react-navigation/bottom-tabs";
|
|
import { BottomTabNavigationOptions, BottomTabNavigationProp, createBottomTabNavigator } from "@react-navigation/bottom-tabs";
|
|
import { observer } from "mobx-react";
|
|
import { observer } from "mobx-react";
|
|
import React, { useEffect } from "react";
|
|
import React, { useEffect } from "react";
|
|
-import { AppState, Platform, SafeAreaView, View, Text, Alert } from 'react-native';
|
|
|
|
|
|
+import { AppState, Platform, SafeAreaView, View, Text, Alert, OpaqueColorValue, ViewStyle } from 'react-native';
|
|
import OutdoorMap from "../components/Map/MainMapComponent/OutdoorMap";
|
|
import OutdoorMap from "../components/Map/MainMapComponent/OutdoorMap";
|
|
import Profile from "../components/Profile/Profile";
|
|
import Profile from "../components/Profile/Profile";
|
|
import { colors, SECURESTORE_NOTIFTOKEN } from "../utils/GlobalUtils";
|
|
import { colors, SECURESTORE_NOTIFTOKEN } from "../utils/GlobalUtils";
|
|
@@ -40,11 +40,9 @@ const MainTabs = createBottomTabNavigator();
|
|
const tabBarOptions: BottomTabNavigationOptions = {
|
|
const tabBarOptions: BottomTabNavigationOptions = {
|
|
//keyboardHidesTabBar: true,
|
|
//keyboardHidesTabBar: true,
|
|
tabBarActiveTintColor: 'white',
|
|
tabBarActiveTintColor: 'white',
|
|
- tabBarActiveBackgroundColor: '#e35555',
|
|
|
|
tabBarInactiveTintColor: "lightgray",
|
|
tabBarInactiveTintColor: "lightgray",
|
|
headerShown:false,
|
|
headerShown:false,
|
|
-
|
|
|
|
- tabBarStyle: {backgroundColor: colors.red, height: 60, justifyContent: 'center'},
|
|
|
|
|
|
+ tabBarStyle: {height: 90, backgroundColor: colors.red, justifyContent: 'center'},
|
|
tabBarLabelStyle: {marginBottom: 7},
|
|
tabBarLabelStyle: {marginBottom: 7},
|
|
tabBarIconStyle: {marginBottom: 7}
|
|
tabBarIconStyle: {marginBottom: 7}
|
|
}
|
|
}
|
|
@@ -214,25 +212,37 @@ const AuthorizedNavigator: React.FC = () => {
|
|
return newNotifAmount > 0 ? <Badge positioning={{top: 8, left: 13,}} value={newNotifAmount}/> : null
|
|
return newNotifAmount > 0 ? <Badge positioning={{top: 8, left: 13,}} value={newNotifAmount}/> : null
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ // const IconView: React.FC<{iconType: Icone, focused: boolean, color: string}> = ({iconType, color, focused, children}) => {
|
|
|
|
+ // const activeBorderStyles: ViewStyle = {borderTopWidth: 1, borderTopColor: color}
|
|
|
|
+
|
|
|
|
+ // return (
|
|
|
|
+ // <View style={[{position: 'absolute', top: 15, flexDirection: 'row', alignItems: 'center', justifyContent: 'center'}, focused ? activeBorderStyles : null ]}>
|
|
|
|
+ // <FontAwesome name={focused ? 'bell' : 'bell-o'} size={getIconSize(focused)} color={color} />
|
|
|
|
+ // <FontAwesome name={focused ? iconType : iconType + '-o'} size={getIconSize(focused)} color={color} />
|
|
|
|
+ // {children}
|
|
|
|
+ // </View>
|
|
|
|
+ // )
|
|
|
|
+ // }
|
|
|
|
+
|
|
return(
|
|
return(
|
|
- <SafeAreaView style={{height: '100%'}}>
|
|
|
|
|
|
+ <View style={{height: '100%'}}>
|
|
{/* <AdMobBanner adUnitID="ca-app-pub-3940256099942544/6300978111" /> */}
|
|
{/* <AdMobBanner adUnitID="ca-app-pub-3940256099942544/6300978111" /> */}
|
|
<MainTabs.Navigator
|
|
<MainTabs.Navigator
|
|
sceneContainerStyle={{flex:1}}
|
|
sceneContainerStyle={{flex:1}}
|
|
initialRouteName="Map"
|
|
initialRouteName="Map"
|
|
screenOptions={tabBarOptions}>
|
|
screenOptions={tabBarOptions}>
|
|
- <MainTabs.Screen name="Map" component={MapNavigator} options={{tabBarIcon: ({color, focused}) => (<FontAwesome name={focused ? 'map' : 'map-o'} size={getIconSize(focused)} color={color} style={{position: 'absolute', top: 10}}/>)}}/>
|
|
|
|
|
|
+ <MainTabs.Screen name="Map" component={MapNavigator} options={{tabBarIcon: ({color, focused}) => (<FontAwesome name={focused ? 'map' : 'map-o'} size={getIconSize(focused)} color={color} style={{position: 'absolute', top: 15}}/>)}}/>
|
|
<MainTabs.Screen name="Feed" options={{tabBarIcon: ({color, focused}) => (
|
|
<MainTabs.Screen name="Feed" options={{tabBarIcon: ({color, focused}) => (
|
|
- <View style={{position: 'absolute', top: 10}}>
|
|
|
|
|
|
+ <View style={{position: 'absolute', top: 15}}>
|
|
<FontAwesome name={focused ? 'bell' : 'bell-o'} size={getIconSize(focused)} color={color} />
|
|
<FontAwesome name={focused ? 'bell' : 'bell-o'} size={getIconSize(focused)} color={color} />
|
|
{renderFeedBadge()}
|
|
{renderFeedBadge()}
|
|
</View>
|
|
</View>
|
|
)}}>
|
|
)}}>
|
|
{() => <Feed notifications={notifications} handleNotifInteraction={handleNotificationInteraction} />}
|
|
{() => <Feed notifications={notifications} handleNotifInteraction={handleNotificationInteraction} />}
|
|
</MainTabs.Screen>
|
|
</MainTabs.Screen>
|
|
- <MainTabs.Screen name="Profile" component={Profile} options={{tabBarIcon: ({color, focused}) => (<FontAwesome name={focused ? 'user' : 'user-o'} size={getIconSize(focused)} color={color} style={{position: 'absolute', top: 10}}/>)}} />
|
|
|
|
|
|
+ <MainTabs.Screen name="Profile" component={Profile} options={{tabBarIcon: ({color, focused}) => (<FontAwesome name={focused ? 'user' : 'user-o'} size={getIconSize(focused)} color={color} style={{position: 'absolute', top: 15}}/>)}} />
|
|
</MainTabs.Navigator>
|
|
</MainTabs.Navigator>
|
|
- </SafeAreaView>
|
|
|
|
|
|
+ </View>
|
|
|
|
|
|
)
|
|
)
|
|
}
|
|
}
|