First overhaul of search screen

This commit is contained in:
Lei Nelissen
2022-05-11 23:57:30 +02:00
parent b7a5c0267c
commit d7402bb409
10 changed files with 103 additions and 67 deletions

View File

@@ -7,13 +7,29 @@ import store, { persistedStore } from 'store';
import {
NavigationContainer,
DefaultTheme,
DarkTheme,
DarkTheme as BaseDarkTheme,
} from '@react-navigation/native';
import { useColorScheme } from 'react-native';
import { ColorSchemeContext, themes } from './Colors';
import DownloadManager from './DownloadManager';
// import ErrorReportingAlert from 'utility/ErrorReportingAlert';
const LightTheme = {
...DefaultTheme,
colors: {
...DefaultTheme.colors,
background: themes.light.view.backgroundColor,
}
};
const DarkTheme = {
...BaseDarkTheme,
colors: {
...BaseDarkTheme.colors,
background: themes.light.view.backgroundColor,
}
};
export default function App(): JSX.Element {
const colorScheme = useColorScheme();
// const colorScheme = 'dark';
@@ -41,7 +57,9 @@ export default function App(): JSX.Element {
<Provider store={store}>
<PersistGate loading={null} persistor={persistedStore}>
<ColorSchemeContext.Provider value={theme}>
<NavigationContainer theme={colorScheme === 'dark' ? DarkTheme : DefaultTheme}>
<NavigationContainer
theme={colorScheme === 'dark' ? DarkTheme : LightTheme}
>
<Routes />
<DownloadManager />
</NavigationContainer>