src/firebase.js
//Pegando o nome do user logado
Pegando o nome do user logado
Pegando o nome do user logado
async nomeUser(callback){
        if(!firebase.auth().currentUser){
            return null
        }
        const uid = firebase.auth().currentUser.uid
        await firebase.database().ref("usuario").child(uid).once('value').then(callback)
    }
async nomeUser ( callback ) { if ( ! firebase . auth ( ) . currentUser ) { return null } const uid = firebase . auth ( ) . currentUser . uid await firebase . database ( ) . ref ( "usuario" ) . child ( uid ) . once ( 'value' ) . then ( callback ) }
Pegando o nome do user logado
Pegando o nome do user logado