From 8d4a61147f9cf85cd1ecfa391e795ee5a9bfb534 Mon Sep 17 00:00:00 2001 From: farhantock Date: Wed, 31 Jul 2024 14:19:19 +0700 Subject: [PATCH] feat(route) : new route --- src/navigation/AppRoutes.js | 12 ++++++++++++ src/navigation/BottomTabNavigator.js | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/navigation/AppRoutes.js b/src/navigation/AppRoutes.js index e0f019f..b00077c 100644 --- a/src/navigation/AppRoutes.js +++ b/src/navigation/AppRoutes.js @@ -55,6 +55,8 @@ import DialogFormPost from '../screens/activity/projectAset/post/dialogForm'; import ProjectScreen from '../screens/activity/projectAset/project/index'; import DialogFormProject from '../screens/activity/projectAset/project/dialogForm'; import ProfileScreen from '../screens/Profile'; +import ThemeScreen from '../components/theme' +import LanguageScreen from '../components/language' const Stack = createNativeStackNavigator(); @@ -319,6 +321,16 @@ const AppRoutes = () => { name="ProfileScreen" component={ProfileScreen} /> + + ) } diff --git a/src/navigation/BottomTabNavigator.js b/src/navigation/BottomTabNavigator.js index a7b9f40..8d59b8c 100644 --- a/src/navigation/BottomTabNavigator.js +++ b/src/navigation/BottomTabNavigator.js @@ -16,9 +16,9 @@ const Tab = createBottomTabNavigator(); export default function BottomTabNavigator() { const { theme, useSystemTheme } = useSelector(state => state.themeReducer); + const systemTheme = useColorScheme(); + const tabBarColor = useSystemTheme ? (systemTheme === 'dark' ? colors.black : colors.pureWhite) : (theme === 'dark' ? colors.black : colors.pureWhite); - - const tabBarColor = theme === 'dark' ? colors.black : colors.pureWhite; const activeColor = colors.blue; return (