-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
34 lines (29 loc) · 790 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
29
30
31
32
33
34
import React, { useEffect } from 'react'
import { StatusBar } from 'react-native'
import {
NotificationListener,
requestUserPermission,
} from './src/services/firebaseService'
import Loader from './src/components/pages/loader'
import Navigation from './src/navigation'
import { getBaseColors } from './src/const'
export default function App(): React.JSX.Element {
const [isLoading, setIsLoading] = React.useState(false)
useEffect(() => {
setIsLoading(true)
// Firebase notifications
requestUserPermission()
NotificationListener()
setIsLoading(false)
}, [])
if(isLoading) return <Loader />
return (
<>
<StatusBar
barStyle={'light-content'}
backgroundColor={getBaseColors().PRIMARY}
/>
<Navigation />
</>
)
}