-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
62 lines (50 loc) · 1.63 KB
/
App.js
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import React, { useEffect } from 'react'
import 'expo-dev-client'
//redux
import { createStore, combineReducers, applyMiddleware } from 'redux'
import { Provider } from 'react-redux'
//redux-thunk
import ReduxThunk from 'redux-thunk'
// navigation
import AppNavigator from './src/navigation/navigation'
import { init } from './src/sql/database'
//expo status_bar
import { StatusBar } from 'expo-status-bar'
//file system
import * as FileSystem from 'expo-file-system'
//utilities
import { cleanupCache } from './src/utilities/cleanUpCash'
init()
.then(() => {
console.log('Initialized DB')
})
.catch((err) => {
console.log(`Initializing DB failed. Error: ${err}`)
})
import signupReducer from './src/store/signup-auth/reducer'
import cameraReducer from './src/store/camera/reducer'
import permissionsReducer from './src/store/permissions/reducer'
import galleryReducer from './src/store/event/reducer'
// if (Platform.OS === 'android') {
// // StatusBar.setBackgroundColor('black')
// StatusBar.setBarStyle('light-content')
// }
const rootReducer = combineReducers({
signupReducer: signupReducer,
cameraReducer: cameraReducer,
permissionsReducer: permissionsReducer,
galleryReducer: galleryReducer,
})
const store = createStore(rootReducer, applyMiddleware(ReduxThunk))
export default function App() {
// useEffect(() => {
// cleanupCache({ size: 200 })
// }, [])
const isHermes = () => !!global.HermesInternal
console.log('🚀 ~ file: App.js ~ line 28 ~ isHermes', isHermes())
return (
<Provider store={store}>
<AppNavigator />
</Provider>
)
}