mirror of
https://github.com/openziti/zrok.git
synced 2024-12-22 23:02:52 +01:00
login failed (#64)
This commit is contained in:
parent
242a8bee7b
commit
073507e0e0
@ -4,6 +4,9 @@ import * as identity from './api/identity';
|
||||
const Login = (props) => {
|
||||
const [email, setEmail] = useState('');
|
||||
const [password, setPassword] = useState('');
|
||||
const [failed, setFailed] = useState();
|
||||
|
||||
const errorMessage = <h2 className={"errorMessage"}>Login Failed!</h2>;
|
||||
|
||||
const handleSubmit = async e => {
|
||||
e.preventDefault()
|
||||
@ -21,6 +24,7 @@ const Login = (props) => {
|
||||
console.log('login succeeded', resp)
|
||||
} else {
|
||||
console.log('login failed')
|
||||
setFailed(errorMessage);
|
||||
}
|
||||
})
|
||||
.catch((resp) => {
|
||||
@ -32,6 +36,7 @@ const Login = (props) => {
|
||||
<div className={"fullscreen"}>
|
||||
<img src={"ziggy.svg"} width={200}/>
|
||||
<h1>zrok</h1>
|
||||
{failed}
|
||||
<form onSubmit={handleSubmit}>
|
||||
<fieldset>
|
||||
<legend>Log In</legend>
|
||||
|
@ -133,4 +133,8 @@ h1, h2, h3, h4, h5, h6 {
|
||||
|
||||
svg.flowNode {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.errorMessage {
|
||||
color: deeppink;
|
||||
}
|
Loading…
Reference in New Issue
Block a user