File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -119,7 +119,14 @@ function CustomTabBar(props: BottomTabBarProps) {
119119 accessibilityRole = "button"
120120 accessibilityState = { isFocused ? { selected : true } : { } }
121121 accessibilityLabel = { options . tabBarAccessibilityLabel }
122- testID = { ( options as any ) . tabBarButtonTestID }
122+ testID = { ( ( ) => {
123+ const o = options as unknown as {
124+ tabBarButtonTestID ?: unknown ;
125+ } ;
126+ return typeof o . tabBarButtonTestID === "string"
127+ ? o . tabBarButtonTestID
128+ : undefined ;
129+ } ) ( ) }
123130 onPress = { onPress }
124131 onLongPress = { onLongPress }
125132 style = { {
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import {
1515 HabitColorConfig ,
1616 isThemeReference ,
1717 PriorityLevel ,
18+ ThemeColorKey ,
1819} from "@/types/colors" ;
1920import AsyncStorage from "@react-native-async-storage/async-storage" ;
2021import React , {
@@ -131,8 +132,9 @@ export function ColorPaletteProvider({ children }: { children: ReactNode }) {
131132 ( colorValue : ColorValue ) : string => {
132133 if ( isThemeReference ( colorValue ) ) {
133134 const key = getThemeColorKey ( colorValue ) ;
134- if ( key && key in theme . colors ) {
135- return ( theme . colors as any ) [ key ] || colorValue ;
135+ if ( key ) {
136+ const colors = theme . colors as Record < ThemeColorKey , string > ;
137+ return colors [ key ] ?? colorValue ;
136138 }
137139 }
138140 return colorValue ;
You can’t perform that action at this time.
0 commit comments