diff --git a/components/TabNavigator.js b/components/TabNavigator.js
index ade475b6..a5d81549 100644
--- a/components/TabNavigator.js
+++ b/components/TabNavigator.js
@@ -1,5 +1,5 @@
import React from 'react';
-import {Platform} from 'react-native';
+import { Platform } from 'react-native';
import { createBottomTabNavigator } from 'react-navigation';
import { Ionicons, Entypo } from '@expo/vector-icons';
@@ -10,19 +10,14 @@ import AnnouncementsScreen from '../screens/Announcements';
import TicketScreen from '../screens/Ticket';
import Config from '../config/config';
-
-// Gets the name of the icon for the specific platform.
-// If iOS, returns ios-name, else md-name.
-function getPlatformIconName(name) {
- return (Platform.OS === 'ios' ? 'ios' : 'md') + '-' + name;
-}
+import { getPlatformSpecificIconName } from '../utils/Icons';
export default createBottomTabNavigator({
Schedule: {
screen: ScheduleScreen,
navigationOptions: {
tabBarIcon: ({ tintColor }) => (
-
+
)
}
},
@@ -30,7 +25,7 @@ export default createBottomTabNavigator({
screen: MapScreen,
navigationOptions: {
tabBarIcon: ({ tintColor }) => (
-
+
)
}
},
@@ -38,7 +33,7 @@ export default createBottomTabNavigator({
screen: CountdownScreen,
navigationOptions: {
tabBarIcon: ({ tintColor }) => (
-
+
)
}
},
@@ -46,7 +41,7 @@ export default createBottomTabNavigator({
screen: AnnouncementsScreen,
navigationOptions: {
tabBarIcon: ({ tintColor }) => (
-
+
)
}
},
diff --git a/utils/Icons.js b/utils/Icons.js
new file mode 100644
index 00000000..e0d52223
--- /dev/null
+++ b/utils/Icons.js
@@ -0,0 +1,7 @@
+import { Platform } from 'react-native';
+
+// Gets the name of the icon for the specific platform.
+// If iOS, returns ios-name, else md-name.
+export function getPlatformSpecificIconName(name) {
+ return (Platform.OS === 'ios' ? 'ios' : 'md') + '-' + name;
+}
\ No newline at end of file