mirror of
https://github.com/FranP-code/Hangman-game-with-React.git
synced 2025-10-13 00:42:32 +00:00
Input logic for mobile users done
This commit is contained in:
@@ -1,13 +1,18 @@
|
||||
import React from 'react'
|
||||
import alphabet from '../../General Scripts/alphabet'
|
||||
import checkDefeat from '../../General Scripts/checkDefeat'
|
||||
|
||||
const LetterInput = ({registerKeys}) => {
|
||||
|
||||
const LetterInput = ({displayApp, setLettersRegistered, lettersRegistered, selectedWord, correctLetters, setCorrectLetters, setEndOfGame, setHangmanFrame, hangmanFrame, checkVictory}) => {
|
||||
|
||||
|
||||
const registerInput = (letter) => {
|
||||
|
||||
const input = document.getElementById('letter-input')
|
||||
const currentKey = letter
|
||||
|
||||
input.value = ''
|
||||
}
|
||||
document.dispatchEvent(new KeyboardEvent('keyup', input));
|
||||
input.value = ''
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="letter-input-container">
|
||||
|
||||
Reference in New Issue
Block a user