I'm coding in react and I realized that my await nas no effect (at least that's what my vscode is alerting to me)
const voltar = async (argumento) => {
if(argumento == "autoriza"){
await autoriza()
}
fc_volta();
history('/')
}
const autoriza = () => {
fetch('https://api.github.com/users/someuser/repos')
.then(resposta => resposta.json())
.then(dados => console.log(dados))
}
Can someone explain to me what is wrong?