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,
|
||||
|
||||
@@ -50,8 +50,6 @@ const DeleteWordDemo = () => {
|
||||
|
||||
setLoading(true)
|
||||
setCategorySelect(category)
|
||||
|
||||
console.log(category);
|
||||
|
||||
const words = await ['Example 1', 'Example 2', 'Example 3']
|
||||
|
||||
|
||||
@@ -2,8 +2,6 @@ const DemoMessageLogic = (setMessage) => {
|
||||
|
||||
const message = document.getElementById('demo-message')
|
||||
|
||||
console.log(message)
|
||||
|
||||
}
|
||||
|
||||
export default DemoMessageLogic
|
||||
|
||||
@@ -66,8 +66,7 @@ function Game() {
|
||||
|
||||
let word = await BringTheWords(language, category, selectedWord)
|
||||
word = word.toLowerCase()
|
||||
|
||||
console.log(word)
|
||||
|
||||
await setSelectedWord(word)
|
||||
await setDisplayApp(true)
|
||||
}
|
||||
@@ -91,7 +90,6 @@ function Game() {
|
||||
bringWordFromFirebase()
|
||||
}
|
||||
|
||||
console.log(category)
|
||||
}, [categoryIsReady])
|
||||
|
||||
|
||||
@@ -100,7 +98,6 @@ function Game() {
|
||||
const registerKeys = e => {
|
||||
|
||||
if (displayApp) {
|
||||
console.log(e)
|
||||
|
||||
let currentKey
|
||||
|
||||
|
||||
@@ -24,9 +24,6 @@ const AppHeader = ({language, category, displayCategories, setDisplayCategories,
|
||||
if (category) {
|
||||
|
||||
if (category !== 'false') {
|
||||
|
||||
|
||||
console.log(category);
|
||||
|
||||
let categoryText = category.split('')
|
||||
categoryText[0] = categoryText[0].toUpperCase()
|
||||
|
||||
@@ -48,7 +48,6 @@ const Categories = ({AppLanguage, displayCategories, category, setCategory, curr
|
||||
Bring_All_Categories(setCategories, setStrech, AppLanguage, category)
|
||||
Bring_All_Languages(setLanguages)
|
||||
|
||||
console.log(categories)
|
||||
}, [])
|
||||
|
||||
return (
|
||||
@@ -62,8 +61,6 @@ const Categories = ({AppLanguage, displayCategories, category, setCategory, curr
|
||||
|
||||
languages.map((language) => {
|
||||
|
||||
console.log(AppLanguage);
|
||||
|
||||
if (language === capitalize(AppLanguage)) {
|
||||
|
||||
return <option key={language} value={language} selected > {language.toUpperCase()} </option>
|
||||
|
||||
@@ -5,10 +5,6 @@ import capitalize from "../../../../../General Scripts/Capilazate";
|
||||
|
||||
|
||||
const Bring_All_Categories = async (setCategories, setStrech, language) => {
|
||||
|
||||
console.log(language)
|
||||
|
||||
|
||||
|
||||
try {
|
||||
|
||||
@@ -30,13 +26,11 @@ const Bring_All_Categories = async (setCategories, setStrech, language) => {
|
||||
|
||||
categories = categories.map(doc => [capitalize(doc[0], true), doc[1]])
|
||||
|
||||
console.log(categories)
|
||||
setCategories(await categories)
|
||||
|
||||
AdjustHeightCategories(await categories, setStrech)
|
||||
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@ const Bring_All_Languages = async (setLanguage) => {
|
||||
setLanguage(languages)
|
||||
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
const AdjustHeightCategories = (categories, setStrech) => {
|
||||
|
||||
console.log(categories)
|
||||
|
||||
if (categories.length >= 5) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user