Console.logs removed

This commit is contained in:
2021-10-25 22:46:52 -03:00
parent df03437d5e
commit eda3f0b570
35 changed files with 6 additions and 95 deletions

View File

@@ -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)

View File

@@ -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)
}
}

View File

@@ -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)
}
}

View File

@@ -13,7 +13,6 @@ const BringAdminCode = async () => {
} catch (error) {
console.log(error)
}
}

View File

@@ -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)
}
}

View File

@@ -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')
}
}

View File

@@ -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
}

View File

@@ -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...`

View File

@@ -37,7 +37,6 @@ const AddCategoryToFirebase = async (englishCategory, spanishCategory, fristWord
}
} catch (error) {
console.log(error)
return {
sucess: false,

View File

@@ -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`

View File

@@ -14,8 +14,6 @@ const BringCategories = async () => {
return await categories
} catch (error) {
console.log(error)
alert(error)
}
}

View File

@@ -14,8 +14,6 @@ const BringCategories = async () => {
return await categories
} catch (error) {
console.log(error)
alert(error)
}
}

View File

@@ -48,8 +48,6 @@ const DeleteCategoryFirebase = async (category, setData) => {
message: `There's been an error deleting the category ${category}`
})
alert(error)
console.log(error)
}
}

View File

@@ -52,8 +52,6 @@ const DeleteWord = () => {
setLoading(true)
setCategorySelect(category)
console.log(category);
const words = await BringTheWordsFromFirebase(languageSelect, category)

View File

@@ -14,8 +14,6 @@ const BringCategories = async () => {
return await categories
} catch (error) {
console.log(error)
alert(error)
}
}

View File

@@ -13,7 +13,6 @@ const BringTheWordsFromFirebase = async (language, category) => {
return await words
} catch (error) {
console.log(error)
}
}

View File

@@ -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}`

View File

@@ -76,7 +76,6 @@ const EditWord = () => {
setLoading(true)
const result = await BringWordsFromFirebase(languageSelection, categorySelected)
console.log(result)
setWordsList(result)
setLoading(false)

View File

@@ -14,8 +14,7 @@ const BringCategories = async () => {
return await categories
} catch (error) {
console.log(error)
alert(error)
}
}

View File

@@ -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)
}
}

View File

@@ -21,8 +21,6 @@ const modifyWordInFirebase = async (language, category, word, newWord) => {
} catch (error) {
console.log(error)
return {
sucess: false,

View File

@@ -50,8 +50,6 @@ const DeleteWordDemo = () => {
setLoading(true)
setCategorySelect(category)
console.log(category);
const words = await ['Example 1', 'Example 2', 'Example 3']

View File

@@ -2,8 +2,6 @@ const DemoMessageLogic = (setMessage) => {
const message = document.getElementById('demo-message')
console.log(message)
}
export default DemoMessageLogic

View File

@@ -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

View File

@@ -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()

View File

@@ -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>

View File

@@ -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)
}
}

View File

@@ -17,7 +17,6 @@ const Bring_All_Languages = async (setLanguage) => {
setLanguage(languages)
} catch (error) {
console.log(error)
}
}

View File

@@ -1,6 +1,4 @@
const AdjustHeightCategories = (categories, setStrech) => {
console.log(categories)
if (categories.length >= 5) {