-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
41 lines (34 loc) · 1.02 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
import 'react-native-gesture-handler';
import React, {useState, useEffect, createContext} from 'react';
import AsyncStorage from '@react-native-community/async-storage';
//Importar los state del context
import AuthState from './context/auth/authState';
import LotteryState from './context/lottery/lotteryState';
import Navegaciones from './components/Navegaciones';
import tokenAuth from './config/token';
const App = () => {
const [tokenLocal, setTokenLocal] = useState(null);
// if (AsyncStorage.getItem('token')) {
// AsyncStorage.getItem('token').then((value) => {
// if(typeof value === "string") {
// console.log('tokenApp: ', value);
// setTokenLocal(value);
// tokenAuth(value);
// } else {
// console.log('else');
// }
// });
// } else {
// console.log('hola');
// }
return (
<>
<AuthState>
<LotteryState>
<Navegaciones tokenLocal={tokenLocal}/>
</LotteryState>
</AuthState>
</>
);
};
export default App;