Фикс ошибки

This commit is contained in:
DyCTaTOR 2023-12-23 00:13:55 +04:00
parent 3828504356
commit 91a1b32a88

View File

@ -1,52 +1,6 @@
import { useState } from 'react';
import { Button, Form, Input } from 'react-bootstrap';
const Page3 = () => {
const someValue = 'Некоторое значение';
const [validated, setValidated] = useState(false);
const [formData, setFormData] = useState({
lastname: '',
firstname: '',
email: '',
password: '',
date: '',
disabled: someValue,
readonly: someValue,
color: '#ff0055',
checkbox1: false,
checkbox2: false,
radio1: false,
radio2: false,
selected: '',
});
const handleSubmit = (event) => {
const form = event.currentTarget;
event.preventDefault();
event.stopPropagation();
if (form.checkValidity() !== false) {
console.log(formData);
}
setValidated(true);
};
const handleChange = (event) => {
const inputName = event.target.name;
const inputValue = event.target.type === 'checkbox' ? event.target.checked : event.target.value;
setFormData({
...formData,
[inputName]: inputValue,
});
};
return (
<div className='row justify-content-center'>
<Input className = "justify-content-md-center w-50"
value = 'sxasc'
type="search"
id="direction"
name="direction"
required></Input>
</div>
);
};