From 60a8fedb48851165878976869347a3f93c4edd1f Mon Sep 17 00:00:00 2001 From: keplyx Date: Sun, 8 Mar 2020 00:33:08 +0100 Subject: [PATCH] Removed console.log and changed tab colors --- App.js | 1 - components/Sidebar.js | 2 -- navigation/MainTabNavigator.js | 11 +++++++---- screens/About/AboutScreen.js | 1 - screens/Proximo/ProximoListScreen.js | 2 -- 5 files changed, 7 insertions(+), 10 deletions(-) diff --git a/App.js b/App.js index 58bcf0d..c491d35 100644 --- a/App.js +++ b/App.js @@ -107,7 +107,6 @@ export default class App extends React.Component { * Renders the app based on loading state */ render() { - console.log("render"); if (this.state.isLoading) { return null; } else if (this.state.showIntro || this.state.showUpdate) { diff --git a/components/Sidebar.js b/components/Sidebar.js index cd9bc18..8cf54bd 100644 --- a/components/Sidebar.js +++ b/components/Sidebar.js @@ -141,7 +141,6 @@ export default class SideBar extends React.Component { getRenderItem({item}: Object) { - console.log("rendering SideBar Item"); const onListItemPress = this.onListItemPress.bind(this, item); if (item.icon !== undefined) { return ( @@ -160,7 +159,6 @@ export default class SideBar extends React.Component { } render() { - console.log("rendering SideBar"); return ( diff --git a/navigation/MainTabNavigator.js b/navigation/MainTabNavigator.js index 79f5306..c977c93 100644 --- a/navigation/MainTabNavigator.js +++ b/navigation/MainTabNavigator.js @@ -12,9 +12,9 @@ import ProximoListScreen from "../screens/Proximo/ProximoListScreen"; import ProximoAboutScreen from "../screens/Proximo/ProximoAboutScreen"; import PlanexScreen from '../screens/Websites/PlanexScreen'; import {MaterialCommunityIcons} from "@expo/vector-icons"; -import ThemeManager from "../utils/ThemeManager"; import AsyncStorageManager from "../utils/AsyncStorageManager"; import HeaderButton from "../components/HeaderButton"; +import {withTheme} from 'react-native-paper'; const TAB_ICONS = { Home: 'triangle', @@ -197,16 +197,17 @@ function PlanexStackComponent() { const Tab = createMaterialBottomTabNavigator(); -export default function TabNavigator() { +function TabNavigator(props) { + const {colors} = props.theme; return ( ({ tabBarIcon: ({focused, color, size}) => { let icon = TAB_ICONS[route.name]; // tintColor is ignoring activeColor and inactiveColor for some reason - color = focused ? "#f0edf6" : "#4e1108"; + color = focused ? colors.text : colors.textDisabled; return ; }, })} @@ -234,3 +235,5 @@ export default function TabNavigator() { ); } + +export default withTheme(TabNavigator); diff --git a/screens/About/AboutScreen.js b/screens/About/AboutScreen.js index 165e1d6..e17263f 100644 --- a/screens/About/AboutScreen.js +++ b/screens/About/AboutScreen.js @@ -266,7 +266,6 @@ export default class AboutScreen extends React.Component { */ getCardItem({item}: Object) { let shouldShow = !item.showOnlyInDebug || (item.showOnlyInDebug && this.state.isDebugUnlocked); - console.log(item.text); if (shouldShow) { if (item.showChevron) { return ( diff --git a/screens/Proximo/ProximoListScreen.js b/screens/Proximo/ProximoListScreen.js index 2c06188..8f520d7 100644 --- a/screens/Proximo/ProximoListScreen.js +++ b/screens/Proximo/ProximoListScreen.js @@ -199,7 +199,6 @@ export default class ProximoListScreen extends React.Component { } getModalSortMenu() { - console.log(this.state.currentSortMode); return ( { } render() { - console.log("rendering ProximoListScreen"); return (