diff --git a/src/components/NewGame.jsx b/src/components/NewGame.jsx index a4689b4..738568f 100644 --- a/src/components/NewGame.jsx +++ b/src/components/NewGame.jsx @@ -438,14 +438,22 @@ const Player3Step = ({ playerNameHistory, onNext, onCancel, initialValue = '' }) * @returns {import('preact').VNode} */ const GameTypeStep = ({ onNext, onCancel, initialValue = '' }) => { + const [gameType, setGameType] = useState(initialValue); const gameTypes = ['8-Ball', '9-Ball', '10-Ball', '14/1 endlos']; - const handleSelect = (gameType) => { - onNext(gameType); + const handleSelect = (selectedType) => { + setGameType(selectedType); + }; + + const handleSubmit = (e) => { + e.preventDefault(); + if (gameType) { + onNext(gameType); + } }; return ( -