mirror of
https://github.com/FranP-code/Hangman-game-with-React.git
synced 2025-10-13 00:42:32 +00:00
bugs fix
This commit is contained in:
@@ -15,7 +15,7 @@ const images = {
|
||||
countries: countries,
|
||||
países: countries,
|
||||
|
||||
pokemon: pokemon,
|
||||
pokemons: pokemon,
|
||||
|
||||
'programming languages': programmingLanguage,
|
||||
'lenguajes de programación': programmingLanguage,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, {useState} from 'react'
|
||||
|
||||
const Header = ({language, displayCategories, setDisplayCategories}) => {
|
||||
const Header = ({language, category, displayCategories, setDisplayCategories}) => {
|
||||
|
||||
const [title, setTitle] = useState('')
|
||||
const [categoryText, setCategoryText] = useState('')
|
||||
@@ -18,7 +18,18 @@ const Header = ({language, displayCategories, setDisplayCategories}) => {
|
||||
setTitle('Ahorcado')
|
||||
setCategoryText('Seleccionar categoría')
|
||||
}
|
||||
})
|
||||
|
||||
if (category) {
|
||||
|
||||
console.log(category);
|
||||
|
||||
let categoryText = category.split('')
|
||||
categoryText[0] = categoryText[0].toUpperCase()
|
||||
|
||||
setCategoryText(categoryText)
|
||||
}
|
||||
|
||||
}, [category])
|
||||
|
||||
return (
|
||||
<header>
|
||||
|
||||
Reference in New Issue
Block a user