-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.tsx
More file actions
27 lines (24 loc) · 808 Bytes
/
Copy pathApp.tsx
File metadata and controls
27 lines (24 loc) · 808 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import React from 'react';
import {useColorScheme, View} from 'react-native';
import {darkGreyBackground, white} from './src/assets/colors';
import {Provider} from 'react-redux';
import {PersistGate} from 'redux-persist/integration/react';
import useRedux from './src/redux/useRedux';
import Navigation from './src/navigation/Navigation';
export default function App(): JSX.Element {
const {store, persistor} = useRedux();
const isDarkMode = useColorScheme() === 'dark';
const backgroundStyle = {
backgroundColor: isDarkMode ? darkGreyBackground : white,
flex: 1,
};
return (
<Provider store={store}>
<PersistGate loading={<></>} persistor={persistor}>
<View style={backgroundStyle}>
<Navigation />
</View>
</PersistGate>
</Provider>
);
}