-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
28 lines (23 loc) · 809 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
28
import React from 'react';
import { StatusBar } from 'expo-status-bar';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import DatabaseContext from './database/DatabaseContext';
import useBackendResources from './hooks/useBackendResources';
import useColorScheme from './hooks/useColorScheme';
import Navigation from './navigation/RootTabNavigator';
const App = () => {
const database = useBackendResources();
const colorScheme = useColorScheme();
if (!database) {
return null;
}
return (
<SafeAreaProvider>
<DatabaseContext.Provider value={database}>
<Navigation colorScheme={colorScheme} />
<StatusBar />
</DatabaseContext.Provider>
</SafeAreaProvider>
);
};
export default App;