Skip to content

Commit

Permalink
displayName removal
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinmonisit committed Aug 10, 2022
1 parent 620d0ae commit 5f4de3d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,11 @@ function CreateBlankPlan() {
};
}

async function createUser(uid: string, displayName) {
async function createUser(uid: string) {
const userCollectionRef = collection(db, 'users');
await setDoc(doc(userCollectionRef, uid), {
uid,
createdAt: serverTimestamp(),
displayName,
plan: CreateBlankPlan(),
secondPlan: CreateBlankPlan(),
thirdPlan: CreateBlankPlan(),
Expand All @@ -92,7 +91,7 @@ function App() {
const docRef = doc(db, 'users', user.uid);
getDoc(docRef).then(async (userDocTemp) => {
if (!userDocTemp.exists()) {
await createUser(user.uid, user.displayName);
await createUser(user.uid);
}
setUserDataExists(true);
});
Expand Down

0 comments on commit 5f4de3d

Please sign in to comment.