remove debugging

This commit is contained in:
mantikoros 2022-01-17 19:58:32 -06:00
parent e664e4abd2
commit 85e879344d
2 changed files with 3 additions and 5 deletions

View File

@ -2,8 +2,8 @@ import { getFirestore } from '@firebase/firestore'
import { initializeApp } from 'firebase/app' import { initializeApp } from 'firebase/app'
// TODO: Reenable this when we have a way to set the Firebase db in dev // TODO: Reenable this when we have a way to set the Firebase db in dev
export const isProd = process.env.NODE_ENV === 'production' // export const isProd = process.env.NODE_ENV === 'production'
// export const isProd = true export const isProd = true
const firebaseConfig = isProd const firebaseConfig = isProd
? { ? {

View File

@ -1,4 +1,3 @@
import { app } from './init'
import { import {
getFirestore, getFirestore,
doc, doc,
@ -19,6 +18,7 @@ import {
signInWithPopup, signInWithPopup,
} from 'firebase/auth' } from 'firebase/auth'
import { app } from './init'
import { User } from '../../../common/user' import { User } from '../../../common/user'
import { listenForValues } from './utils' import { listenForValues } from './utils'
import { createUser } from './api-call' import { createUser } from './api-call'
@ -68,10 +68,8 @@ export function listenForLogin(onUser: (user: User | null) => void) {
let user: User | null = await getUser(fbUser.uid) let user: User | null = await getUser(fbUser.uid)
if (!user) { if (!user) {
// User just created an account; save them to our database.
if (!createUserPromise) { if (!createUserPromise) {
createUserPromise = createUser() createUserPromise = createUser()
console.log('this should only be logged once')
} }
user = (await createUserPromise) || null user = (await createUserPromise) || null
} }