-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
38 lines (34 loc) · 1.14 KB
/
App.tsx
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
28
29
30
31
32
33
34
35
36
37
38
import React from 'react';
import {StatusBar} from 'react-native';
import {SafeAreaProvider} from 'react-native-safe-area-context';
import {Provider} from 'react-redux';
import {PersistGate} from 'redux-persist/integration/react';
import {QueryClient, QueryClientProvider} from 'react-query';
import 'react-native-gesture-handler';
//files
import Navigation from './src/navigation';
import useColorScheme from './src/hooks/useColorScheme';
import store, {persistor} from './src/lib/redux/store';
const App: React.FC = () => {
// theme
const colorScheme = useColorScheme();
// react-query
const [queryClient] = React.useState(() => new QueryClient());
return (
<QueryClientProvider client={queryClient}>
<Provider store={store}>
<PersistGate loading={null} persistor={persistor}>
<SafeAreaProvider>
<Navigation colorScheme={colorScheme} />
<StatusBar
barStyle={
colorScheme === 'dark' ? 'light-content' : 'dark-content'
}
/>
</SafeAreaProvider>
</PersistGate>
</Provider>
</QueryClientProvider>
);
};
export default App;