-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
27 lines (24 loc) · 799 Bytes
/
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
import React from "react";
import {
DarkTheme,
DefaultTheme,
NavigationContainer,
} from "@react-navigation/native";
import Root from "./navigation/Root";
import { ThemeProvider } from "styled-components";
import { useColorScheme } from "react-native";
import { darkTheme, ligthTheme } from "./theme";
import { QueryClient, QueryClientProvider } from "react-query";
const queryClient = new QueryClient();
export default function App() {
const isDark = useColorScheme() === "dark" && true;
return (
<QueryClientProvider client={queryClient}>
<ThemeProvider theme={isDark ? darkTheme : ligthTheme}>
<NavigationContainer theme={isDark ? DarkTheme : DefaultTheme}>
<Root />
</NavigationContainer>
</ThemeProvider>
</QueryClientProvider>
);
}