web/firebase/index.js
/**
 * Creates a new document under the users collection in Firestore for new users
 * @param {object} user 
 */
Creates a new document under the users collection in Firestore for new users
@param {object} user
Creates a new document under the users collection in Firestore for new users @param { object } user
function pushNewUserToFirebase(user) {
  db.collection("users").doc(user.email).set({
    name: user.displayName
  }).then(function () {
    console.log("Document written with ID: ", user.email);
  }).catch(function (error) {
    console.error("Error adding document: ", error);
  });
}
function pushNewUserToFirebase ( user ) { db . collection ( "users" ) . doc ( user . email ) . set ( { name : user . displayName } ) . then ( function ( ) { console . log ( "Document written with ID: " , user . email ) ; } ) . catch ( function ( error ) { console . error ( "Error adding document: " , error ) ; } ) ; }
Creates a new document under the users collection in Firestore for new users
 @param {object} user
Creates a new document under the users collection in Firestore for new users @param { object } user