This commit is contained in:
Андрей Дувакин 2024-10-04 18:10:39 +05:00
parent d37676f6f9
commit 653ba03fd6

View File

@ -18,31 +18,33 @@ const Login = () => {
};
return (
<div>
<h2>Вход</h2>
{error && <p style={{ color: 'red' }}>{error}</p>}
<form onSubmit={handleSubmit}>
<div>
<div className="container mt-5">
<h2 className="text-center">Вход</h2>
{error && <p className="text-danger text-center">{error}</p>}
<form onSubmit={handleSubmit} className="border p-4 rounded shadow">
<div className="form-group">
<label htmlFor="login">Логин</label>
<input
type="text"
id="login"
className="form-control"
value={login}
onChange={(e) => setLogin(e.target.value)}
required
/>
</div>
<div>
<div className="form-group">
<label htmlFor="password">Пароль</label>
<input
type="password"
id="password"
className="form-control"
value={password}
onChange={(e) => setPassword(e.target.value)}
required
/>
</div>
<button type="submit">Войти</button>
<button type="submit" className="btn btn-primary btn-block">Войти</button>
</form>
</div>
);