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