-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathApp.js
More file actions
30 lines (27 loc) · 940 Bytes
/
Copy pathApp.js
File metadata and controls
30 lines (27 loc) · 940 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
28
29
30
import { ThemeProvider } from '@emotion/react';
import {
DarkTheme,
DefaultTheme,
NavigationContainer,
} from '@react-navigation/native';
import { useColorScheme } from 'react-native';
import { QueryClient, QueryClientProvider } from 'react-query';
import Root from './src/navigation/Root';
import { darkTheme, lightTheme } from './src/theme';
import 'react-native-get-random-values';
import { StatusBar } from 'expo-status-bar';
// react-query 이용을 위한 클라이언트
const queryClient = new QueryClient();
export default function App() {
const isDark = useColorScheme() === 'dark';
return (
<ThemeProvider theme={isDark ? darkTheme : lightTheme}>
<QueryClientProvider client={queryClient}>
<NavigationContainer theme={isDark ? DarkTheme : DefaultTheme}>
<StatusBar style="auto" />
<Root />
</NavigationContainer>
</QueryClientProvider>
</ThemeProvider>
);
}