Fix conflict and add disabled button when invalid input (#30)

* feat: responsive

* fix: success register

* feat: auth login responsive && auth login implementation

* fix: login page button disabled & register page

* fix: conflict

* fix: button disabled when loading
This commit is contained in:
Naufal Azmi
2025-05-26 17:07:51 +07:00
committed by GitHub
parent dd03b3da85
commit 0f46244d2b
8 changed files with 35 additions and 16 deletions
+9 -2
View File
@@ -5,7 +5,7 @@ import { useLogin } from '../../_hooks/use-login';
import { ArrowLeftOutlined } from '@ant-design/icons';
export const Components: FC = (): ReactElement => {
const { form, onSubmit } = useLogin();
const { form, onSubmit, isLoading } = useLogin();
return (
<div className="flex flex-col justify-center items-center min-h-screen py-[60px] px-[80px]">
@@ -42,7 +42,7 @@ export const Components: FC = (): ReactElement => {
Lupa Password ?
</a>
</div>
<Button className="w-full" type='submit'>Enter Isekai</Button>
<Button className="w-full" type='submit' disabled={(!form.formState.isValid || isLoading)}>Enter Isekai</Button>
</form>
<div className="flex my-3 gap-3 justify-center">
@@ -74,6 +74,13 @@ export const Components: FC = (): ReactElement => {
<ArrowLeftOutlined />
Kembali Ke Homepage
</Button>
<Button
className='xl:hidden w-full gap-3'
variant='secondary'
>
<ArrowLeftOutlined />
Kembali Ke Homepage
</Button>
</div>
</div>
</div>