mirror of
https://github.com/openziti/zrok.git
synced 2024-12-23 07:09:12 +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 Login = (props) => {
|
||||||
const [email, setEmail] = useState('');
|
const [email, setEmail] = useState('');
|
||||||
const [password, setPassword] = useState('');
|
const [password, setPassword] = useState('');
|
||||||
|
const [failed, setFailed] = useState();
|
||||||
|
|
||||||
|
const errorMessage = <h2 className={"errorMessage"}>Login Failed!</h2>;
|
||||||
|
|
||||||
const handleSubmit = async e => {
|
const handleSubmit = async e => {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
@ -21,6 +24,7 @@ const Login = (props) => {
|
|||||||
console.log('login succeeded', resp)
|
console.log('login succeeded', resp)
|
||||||
} else {
|
} else {
|
||||||
console.log('login failed')
|
console.log('login failed')
|
||||||
|
setFailed(errorMessage);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((resp) => {
|
.catch((resp) => {
|
||||||
@ -32,6 +36,7 @@ const Login = (props) => {
|
|||||||
<div className={"fullscreen"}>
|
<div className={"fullscreen"}>
|
||||||
<img src={"ziggy.svg"} width={200}/>
|
<img src={"ziggy.svg"} width={200}/>
|
||||||
<h1>zrok</h1>
|
<h1>zrok</h1>
|
||||||
|
{failed}
|
||||||
<form onSubmit={handleSubmit}>
|
<form onSubmit={handleSubmit}>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>Log In</legend>
|
<legend>Log In</legend>
|
||||||
|
@ -134,3 +134,7 @@ h1, h2, h3, h4, h5, h6 {
|
|||||||
svg.flowNode {
|
svg.flowNode {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.errorMessage {
|
||||||
|
color: deeppink;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user