From 0f9783c29250e38436fa6f0c82efd5ee2cfdf334 Mon Sep 17 00:00:00 2001 From: Jakob Stornig Date: Sun, 3 Dec 2023 19:41:37 +0100 Subject: [PATCH] fix: System style change does not propergate --- app/_layout.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/_layout.tsx b/app/_layout.tsx index fb3bea4..8a4b149 100644 --- a/app/_layout.tsx +++ b/app/_layout.tsx @@ -5,23 +5,23 @@ import { FontAwesome } from "@expo/vector-icons"; import {useThemeColor} from "../hooks/hooks"; export default function Layout() { - const selectedColor: string = useThemeColor( "tabIconSelected"); - const defaultColor: string = useThemeColor("tabIconDefault"); - const backgroundColor: string = useThemeColor("backgroundColor"); - const tabBarColor: string = useThemeColor("tabBarColor"); + // const selectedColor: string = useThemeColor( "tabIconSelected"); + // const defaultColor: string = useThemeColor("tabIconDefault"); + // const backgroundColor: string = useThemeColor("backgroundColor"); + // const tabBarColor: string = useThemeColor("tabBarColor"); const styles = StyleSheet.create({ sceneContainer: { - backgroundColor: backgroundColor, + backgroundColor: useThemeColor("backgroundColor"), }, tabBar: { - backgroundColor: tabBarColor, + backgroundColor: useThemeColor("backgroundColor"), } }); const screenOptions = { - tabBarActiveTintColor: selectedColor, - tabBarInactiveTintColor: defaultColor, + tabBarActiveTintColor: useThemeColor( "tabIconSelected"), + tabBarInactiveTintColor: useThemeColor("tabIconDefault"), headerShown: false, tabBarStyle: styles.tabBar, }