-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
26 lines (23 loc) · 809 Bytes
/
App.js
File metadata and controls
26 lines (23 loc) · 809 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
import { useColorScheme } from "react-native";
import { ThemeProvider } from "styled-components/native";
import { NavigationContainer } from "@react-navigation/native";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { StatusBar } from "expo-status-bar";
import { darkTheme, lightTheme } from "./styled";
import Preload from "./Preload";
import Root from "./navigations/Root";
export default function App() {
Preload();
const isDark = useColorScheme() === "dark";
const queryClient = new QueryClient();
return (
<QueryClientProvider client={queryClient}>
<ThemeProvider theme={isDark ? darkTheme : lightTheme}>
<NavigationContainer>
<Root />
<StatusBar style={"light"} />
</NavigationContainer>
</ThemeProvider>
</QueryClientProvider>
);
}