This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {Component} from 'react'; | |
import {Text, View, Image, TouchableOpacity, AsyncStorage, Alert} from 'react-native'; | |
import styles from './styles'; | |
import Icon from 'react-native-vector-icons/FontAwesome5'; | |
import Loading from '../../components/Loading'; | |
export default class Inicio extends Component { | |
state ={ | |
info: [], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
logar(email, senha, token, tipo){ | |
if(email == ""){ | |
Alert.alert("Aviso", "Preencha o campo e-mail."); | |
}else if(senha == ""){ | |
Alert.alert("Aviso", "Preencha o campo senha."); | |
}else{ | |
this.setState({loading: true}); | |
fetch(`https://www.buscabelem.com.br/api/cadastro_login.php?login=${email}&senha=${senha}&token=${token}&tipo=${tipo}`).then((response)=>{ | |
response.json().then((result)=>{ | |
if(result.status){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async logar(email, senha, token, tipo){ | |
try { | |
if(email == ""){ | |
Alert.alert("Aviso", "Preencha o campo e-mail."); | |
}else if(senha == ""){ | |
Alert.alert("Aviso", "Preencha o campo senha."); | |
}else{ | |
this.setState({loading: true}); | |
const response = await fetch(`https://www.buscabelem.com.br/api/cadastro_login.php?login=${email}&senha=${senha}&token=${token}&tipo=${tipo}`); | |
const result = await response.json(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
["ad","address-book","address-card","adjust","air-freshener","align-center","align-justify","align-left","align-right","allergies","ambulance","american-sign-language-interpreting","anchor","angle-double-down","angle-double-left","angle-double-right","angle-double-up","angle-down","angle-left","angle-right","angle-up","angry","ankh","apple-alt","archive","archway","arrow-alt-circle-down","arrow-alt-circle-left","arrow-alt-circle-right","arrow-alt-circle-up","arrow-circle-down","arrow-circle-left","arrow-circle-right","arrow-circle-up","arrow-down","arrow-left","arrow-right","arrow-up","arrows-alt","arrows-alt-h","arrows-alt-v","assistive-listening-systems","asterisk","at","atlas","atom","audio-description","award","baby","baby-carriage","backspace","backward","bacon","balance-scale","balance-scale-left","balance-scale-right","ban","band-aid","barcode","bars","baseball-ball","basketball-ball","bath","battery-empty","battery-full","battery-half","battery-quarter","battery-three-quarters","bed","beer","bell","be |