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