File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -159,7 +159,9 @@ export const ThemeProvider = ({ children }: PropsWithChildren) => {
159159export const useTheme = ( ) : ThemeColors => {
160160 const theme = useContext ( ThemeContext ) ;
161161 if ( ! theme ) {
162- throw new Error ( 'useTheme must be used within a <ThemeProvider />' ) ;
162+ // eslint-disable-next-line no-console
163+ console . error ( 'useTheme must be used within a <ThemeProvider />' ) ;
164+ return { } as ThemeColors ;
163165 }
164166
165167 return theme ;
Original file line number Diff line number Diff line change @@ -16,6 +16,6 @@ export const setStatusBarColor = (color: ThemeColors | ColorInstance) => {
1616} ;
1717
1818export const changeNavigationBarColor = ( color : string , isDark = false ) => {
19- NavigationBar . setBackgroundColorAsync ( color ) ;
19+ // NavigationBar.setBackgroundColorAsync(color);
2020 NavigationBar . setButtonStyleAsync ( isDark ? 'light' : 'dark' ) ;
2121} ;
You can’t perform that action at this time.
0 commit comments