-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
40 lines (35 loc) · 1.05 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
39
import { SafeAreaProvider } from "react-native-safe-area-context"
import { SearchScreen } from "./src/screens"
import { colors } from "./src/theme"
import { StyleSheet } from "react-native"
import { QueryClient, QueryClientProvider } from "react-query"
import { useConnectionStatus } from "./src/hooks/useConnectionStatus"
import { Toasts } from "@backpackapp-io/react-native-toast"
import "react-native-gesture-handler"
import { GestureHandlerRootView } from "react-native-gesture-handler"
const queryClient = new QueryClient({
defaultOptions: {
queries: {
staleTime: 120000 /* 2 min cache*/,
},
},
})
export default function App() {
useConnectionStatus()
return (
<GestureHandlerRootView style={styles.container}>
<QueryClientProvider client={queryClient}>
<SafeAreaProvider>
<SearchScreen />
<Toasts />
</SafeAreaProvider>
</QueryClientProvider>
</GestureHandlerRootView>
)
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: colors.background,
},
})