-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
42 lines (38 loc) · 953 Bytes
/
Copy pathApp.js
File metadata and controls
42 lines (38 loc) · 953 Bytes
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
import { load } from './src/loadApp';
import { useEffect, useState} from 'react';
import * as SplashScreen from 'expo-splash-screen';
import Navigation from './src/navigation/Navigation';
import { Provider } from 'react-redux';
import store from './src/store';
import axios from 'axios';
export default function App() {
const [isLoading, setLoading] = useState(true);
SplashScreen.preventAutoHideAsync();
useEffect(()=>{
const l = async () => {
await load(SplashScreen);
setLoading(false);
//const res =
await axios.post(`https://app.nativenotify.com/api/indie/notification`, {
subID: '123',
appId: 13309,
appToken: '9Sr3Pqbh3qfiyZsUNbVSTt',
title: 'yourid is',
message: '123'
})
.catch(err => {
console.log(err)
})
}
l();
}, []);
return isLoading
? (
null
)
:(
<Provider store={store}>
<Navigation/>
</Provider>
)
}