forked from Drnutsu/covalent-expo-starter-kits
-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
46 lines (41 loc) · 1.28 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
40
41
42
43
44
45
46
import 'react-native-gesture-handler'
import { StatusBar } from 'expo-status-bar'
import React from 'react'
import { Platform } from 'react-native'
import { DefaultTheme, Provider as PaperProvider } from 'react-native-paper'
import { QueryClient, QueryClientProvider } from 'react-query'
import { SafeAreaProvider } from 'react-native-safe-area-context'
import WalletConnectProvider from 'react-native-walletconnect'
import useCachedResources from './hooks/useCachedResources'
import useColorScheme from './hooks/useColorScheme'
import Navigation from './navigation'
const queryClient = new QueryClient()
const theme = {
...DefaultTheme,
roundness: 2,
colors: {
...DefaultTheme.colors,
primary: '#3498db',
accent: '#f1c40f'
}
}
export default function App() {
const isLoadingComplete = useCachedResources()
const colorScheme = useColorScheme()
if (!isLoadingComplete) {
return null
} else {
return (
<SafeAreaProvider>
<WalletConnectProvider>
<QueryClientProvider client={queryClient}>
<PaperProvider theme={theme}>
<Navigation colorScheme={colorScheme} />
<StatusBar />
</PaperProvider>
</QueryClientProvider>
</WalletConnectProvider>
</SafeAreaProvider>
)
}
}