lower new user starting balance to M$1000
This commit is contained in:
parent
11cc6ba622
commit
b85d9035b0
|
@ -8,6 +8,8 @@ import {
|
||||||
signInWithPopup,
|
signInWithPopup,
|
||||||
} from 'firebase/auth'
|
} from 'firebase/auth'
|
||||||
|
|
||||||
|
export const STARTING_BALANCE = 1000
|
||||||
|
|
||||||
export type User = {
|
export type User = {
|
||||||
id: string
|
id: string
|
||||||
email: string
|
email: string
|
||||||
|
@ -50,7 +52,7 @@ export function listenForLogin(onUser: (_user: User | null) => void) {
|
||||||
username: user.displayName?.replace(/\s+/g, '') || 'DefaultUsername',
|
username: user.displayName?.replace(/\s+/g, '') || 'DefaultUsername',
|
||||||
avatarUrl: user.photoURL || '',
|
avatarUrl: user.photoURL || '',
|
||||||
email: user.email || 'default@blah.com',
|
email: user.email || 'default@blah.com',
|
||||||
balance: 10000,
|
balance: STARTING_BALANCE,
|
||||||
// TODO: use Firestore timestamp?
|
// TODO: use Firestore timestamp?
|
||||||
createdTime: Date.now(),
|
createdTime: Date.now(),
|
||||||
lastUpdatedTime: Date.now(),
|
lastUpdatedTime: Date.now(),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user