-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathindex.js
60 lines (51 loc) · 1.82 KB
/
index.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
import React from 'react';
import {
NativeModules,
AppRegistry,
View
} from 'react-360';
import PanelEsquerda from './src/panelEsquerda';
import PanelFrente from './src/panelFrente';
import PanelTras from './src/PanelTras';
import PanelDireita from './src/PanelDireita';
import FunctionLanguage from './src/function/language';
import ServiceLogin from './src/service/login';
const facebook = NativeModules.fbAuth;
export default class Hackathon_CommunityChallenge_2019 extends React.Component {
constructor(props) {
super(props);
}
componentWillMount() {
ServiceLogin.prototype.verificarLogin();
global.ConfigSomMuted = false;
global.ConfigMusicaMuted = false;
global.CreateMusica = true;
global.BarraPontosReqOne = true;
FunctionLanguage.prototype.trocarIdioma("en-us");
}
componentWillUpdate(){
ServiceLogin.prototype.verificarLogin();
}
async componentDidMount(){
await facebook.iniciar(async (sucesso, data) => {
if (sucesso) {
// Usuario já está logado
let response = await ServiceLogin.prototype.postAutenticar(data);
console.log("Usuario já logado", data, response);
global.LayoutBarraUsuario = "ATUALIZAR";
global.PanelFrenteTelaAtual = "ATUALIZAR";
global.PanelTrasTelaAtual = "ATUALIZAR";
global.PanelDireitaTelaAtual = "ATUALIZAR";
global.PanelEsquerdaTelaAtual = "ATUALIZAR";
}
});
}
render(){
return(<View></View>);
}
};
AppRegistry.registerComponent('PanelTras', () => PanelTras);
AppRegistry.registerComponent('PanelFrente', () => PanelFrente);
AppRegistry.registerComponent('PanelDireita', () => PanelDireita);
AppRegistry.registerComponent('PanelEsquerda', () => PanelEsquerda);
AppRegistry.registerComponent('Hackathon_CommunityChallenge_2019', () => Hackathon_CommunityChallenge_2019);