fix login styling
This commit is contained in:
parent
1fe205165d
commit
cdb3fa2955
@ -1,4 +1,4 @@
|
|||||||
input {
|
td input {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
@ -24,12 +24,13 @@ function Login() {
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
try {
|
try {
|
||||||
const res = await loginService({ username: form.username, password: form.password })
|
const res = await loginService({ username: form.username, password: form.password })
|
||||||
|
|
||||||
|
if(res.error) {
|
||||||
if (res.error.response.status == 400) {
|
if (res.error.response.status == 400) {
|
||||||
setErrorMsg(res.error.response.data.errors)
|
setErrorMsg(res.error.response.data.errors)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if(res.error) {
|
|
||||||
alert(res.error.response.data.message)
|
alert(res.error.response.data.message)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -77,7 +78,6 @@ function Login() {
|
|||||||
function onChangeInput(e: ChangeEvent<HTMLInputElement>) {
|
function onChangeInput(e: ChangeEvent<HTMLInputElement>) {
|
||||||
const val = e.target as HTMLInputElement;
|
const val = e.target as HTMLInputElement;
|
||||||
setFrom({ ...form, [val.placeholder]: val.value })
|
setFrom({ ...form, [val.placeholder]: val.value })
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
Loading…
Reference in New Issue
Block a user