Styled victory and defeat

This commit is contained in:
2021-10-14 01:23:04 -03:00
parent cb6e728a3e
commit f56746bf68
9 changed files with 82 additions and 8 deletions

View File

@@ -3,9 +3,9 @@ import Register_Input from '../../Scripts/Register input'
import Defeat from './Defeat'
import Victory from './Victory'
const PuzzleWord = ({hangmanFrame, setHangmanFrame}) => {
const PuzzleWord = ({hangmanFrame, setHangmanFrame, currentScore, setCurrentScore}) => {
const [actualWord, setActualWord] = useState('murcielago')
const [actualWord, setActualWord] = useState('papa')
const [isVictory, setIsVictory] = useState(false)
const [isDefeat, setIsDefeat] = useState(false)
@@ -47,7 +47,7 @@ const PuzzleWord = ({hangmanFrame, setHangmanFrame}) => {
<>
<div className="puzzleWord" id="puzzleWord"></div>
{isVictory ? <Victory /> : null}
{isVictory ? <Victory currentScore={currentScore} setCurrentScore={setCurrentScore} /> : null}
{isDefeat ? <Defeat /> : null}
</>
)