mirror of
https://github.com/FranP-code/Hangman-game-with-React.git
synced 2025-10-13 00:42:32 +00:00
Console.logs removed
This commit is contained in:
@@ -40,9 +40,7 @@ const AccountInfo = (props) => {
|
||||
const bringData = async (email) => {
|
||||
|
||||
const result = await bringDataFromFirebase(email)
|
||||
|
||||
await console.log(result);
|
||||
|
||||
|
||||
await applyResult(await result)
|
||||
|
||||
setLoading(false)
|
||||
|
||||
@@ -7,8 +7,6 @@ const bringDataFromFirebase = async (email) => {
|
||||
|
||||
try {
|
||||
|
||||
console.log(email)
|
||||
|
||||
const db = getFirestore(firestore)
|
||||
const reference = doc(db, 'users', email)
|
||||
const documentSnap = await getDoc(reference)
|
||||
@@ -16,7 +14,6 @@ const bringDataFromFirebase = async (email) => {
|
||||
return await documentSnap.data()
|
||||
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -7,18 +7,15 @@ const bringNameOfEmail = async (email) => {
|
||||
try {
|
||||
|
||||
const id = email
|
||||
console.log(email)
|
||||
|
||||
const db = getFirestore(firestore)
|
||||
const docRef = doc(db, "users", id);
|
||||
const docSnap = await getDoc(docRef);
|
||||
|
||||
|
||||
console.log(docSnap.data())
|
||||
return await docSnap.data()
|
||||
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ const BringAdminCode = async () => {
|
||||
|
||||
} catch (error) {
|
||||
|
||||
console.log(error)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ const RegisterNewUser = async (name, email, password, setMessage, position, reff
|
||||
try {
|
||||
|
||||
const responseUserCreate = await createUserWithEmailAndPassword(auth, email, password)
|
||||
console.log(responseUserCreate)
|
||||
|
||||
const db = getFirestore(firestore)
|
||||
|
||||
@@ -22,7 +21,6 @@ const RegisterNewUser = async (name, email, password, setMessage, position, reff
|
||||
|
||||
} catch (error) {
|
||||
setMessage('There has been an error registering the user. Please try again later')
|
||||
console.log(error)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,10 +10,8 @@ const SignIn = async (data, setMessage) => {
|
||||
try {
|
||||
|
||||
const response = await signInWithEmailAndPassword(auth, email, password)
|
||||
console.log(response)
|
||||
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
setMessage('User or Password wrong')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,14 +13,12 @@ const ValidateRegister = async (data, setMessage) => {
|
||||
|
||||
if (password.length < 6) {
|
||||
|
||||
console.log('PASSWORD TOO SHORT')
|
||||
setMessage('Password too short')
|
||||
return false
|
||||
}
|
||||
|
||||
if (password !== confirmPassword) {
|
||||
|
||||
console.log('LAS CONTRASEÑAS NO COINCIDEN')
|
||||
setMessage('The Passwords not match')
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -15,7 +15,6 @@ const ResetPasswordFirebase = async (email) => {
|
||||
|
||||
} catch(error) {
|
||||
|
||||
console.log(error)
|
||||
return {
|
||||
sucess: false,
|
||||
message: `There's been an error sending the email...`
|
||||
|
||||
@@ -37,7 +37,6 @@ const AddCategoryToFirebase = async (englishCategory, spanishCategory, fristWord
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
|
||||
return {
|
||||
sucess: false,
|
||||
|
||||
@@ -20,7 +20,6 @@ const AddWordToFirebase = async (language, category, word, setData) => {
|
||||
|
||||
} catch (error) {
|
||||
|
||||
console.log(error)
|
||||
setData({
|
||||
sucess: false,
|
||||
message: `There's been an error adding the words`
|
||||
|
||||
@@ -14,8 +14,6 @@ const BringCategories = async () => {
|
||||
return await categories
|
||||
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
alert(error)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,8 +14,6 @@ const BringCategories = async () => {
|
||||
return await categories
|
||||
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
alert(error)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -48,8 +48,6 @@ const DeleteCategoryFirebase = async (category, setData) => {
|
||||
message: `There's been an error deleting the category ${category}`
|
||||
})
|
||||
|
||||
alert(error)
|
||||
console.log(error)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -52,8 +52,6 @@ const DeleteWord = () => {
|
||||
|
||||
setLoading(true)
|
||||
setCategorySelect(category)
|
||||
|
||||
console.log(category);
|
||||
|
||||
const words = await BringTheWordsFromFirebase(languageSelect, category)
|
||||
|
||||
|
||||
@@ -14,8 +14,6 @@ const BringCategories = async () => {
|
||||
return await categories
|
||||
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
alert(error)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ const BringTheWordsFromFirebase = async (language, category) => {
|
||||
|
||||
return await words
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,8 +12,6 @@ const DeleteWordFromFirebase = async (language, category, word) => {
|
||||
|
||||
const categoryLocalizated = categoryFirebase.data()[language]
|
||||
|
||||
console.log(categoryLocalizated)
|
||||
|
||||
await deleteDoc(doc(db, `hangman_words/${language}/${category}`, word))
|
||||
|
||||
return await {
|
||||
@@ -22,8 +20,7 @@ const DeleteWordFromFirebase = async (language, category, word) => {
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
|
||||
|
||||
return {
|
||||
sucess: false,
|
||||
message: `There's been an error deleting the word ${word}`
|
||||
|
||||
@@ -76,7 +76,6 @@ const EditWord = () => {
|
||||
setLoading(true)
|
||||
|
||||
const result = await BringWordsFromFirebase(languageSelection, categorySelected)
|
||||
console.log(result)
|
||||
setWordsList(result)
|
||||
|
||||
setLoading(false)
|
||||
|
||||
@@ -14,8 +14,7 @@ const BringCategories = async () => {
|
||||
return await categories
|
||||
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
alert(error)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,9 +4,6 @@ import { firestore } from "../../../../../../Firebase/Firebase_Config"
|
||||
|
||||
const BringWordsFromFirebase = async (language, category) => {
|
||||
|
||||
console.log(language)
|
||||
console.log(category)
|
||||
|
||||
try {
|
||||
|
||||
const db = getFirestore(firestore)
|
||||
@@ -19,7 +16,6 @@ const BringWordsFromFirebase = async (language, category) => {
|
||||
|
||||
} catch (error) {
|
||||
|
||||
console.log(error)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,8 +21,6 @@ const modifyWordInFirebase = async (language, category, word, newWord) => {
|
||||
|
||||
} catch (error) {
|
||||
|
||||
console.log(error)
|
||||
|
||||
return {
|
||||
|
||||
sucess: false,
|
||||
|
||||
Reference in New Issue
Block a user