Skip to content

Commit

Permalink
Refactor code
Browse files Browse the repository at this point in the history
  • Loading branch information
HauseMasterZ committed Nov 19, 2023
1 parent bfe1c32 commit a4458e1
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/components/Signup.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,6 @@ function Signup() {
}

try {
// const usernameDocRef = query(collection(db, process.env.REACT_APP_FIREBASE_COLLECTION_NAME), where(process.env.REACT_APP_USERNAME_KEY, '==', username), limit(1));
// const emailDocRef = query(collection(db, process.env.REACT_APP_FIREBASE_COLLECTION_NAME), where(process.env.REACT_APP_EMAIL_KEY, '==', email), limit(1));
// const [usernameDoc, emailDoc] = await Promise.all([getDocs(usernameDocRef), getDocs(emailDocRef)]);
// console.log(emailDocRef)
// if (usernameDoc.size > 0) {
// alert('Username already exists');
// return;
// }

// if (emailDoc.size > 0) {
// alert('Email already exists');
// return;
// }

const userCredential = await createUserWithEmailAndPassword(auth, email, password);
const user = userCredential.user;
const userDocRef = doc(db, process.env.REACT_APP_FIREBASE_COLLECTION_NAME, user.uid);
Expand Down

0 comments on commit a4458e1

Please sign in to comment.