diff --git a/src/components/FandStattVer.jsx b/src/components/FandStattVer.jsx index 54a0a42..e09db46 100644 --- a/src/components/FandStattVer.jsx +++ b/src/components/FandStattVer.jsx @@ -5,47 +5,29 @@ import Modal from './Modal' export default function FandStattVer({left, right, title, onNext, radioName = "fst"}) { const { formData, updateFormData } = useFormData() const [auswahl, setAuswahl] = useState(formData.stattgefunden || '') - const [showModal, setShowModal] = useState(false) - const handleOK = () => { - if(!auswahl) { - setShowModal(true) - return - } - updateFormData('stattgefunden', auswahl) - onNext(auswahl) - } - - const closeModal = () => { - setShowModal(false) + const handleRadioChange = (e) => { + const value = e.target.value + setAuswahl(value) + updateFormData('stattgefunden', value) + onNext(value) } return ( - <> - - {title} - - - setAuswahl(e.target.value)} /> - {left} - - - setAuswahl(e.target.value)} /> - {right} - - OK - - - - - Bitte eine Option wählen - - > + + {title} + + + + {left} + + + + {right} + + + ) } \ No newline at end of file
Bitte eine Option wählen