import { ASButton, ASInput } from 'components'; import { useApi } from 'utils'; import { Pillaiyar } from 'static/svgs/pillaiyar'; import './index.scss'; import { LoginApi } from './api'; export default function Login() { const { fetch: checkLogin } = useApi(LoginApi.login); async function handleOnSubmit(event: React.FormEvent) { event.preventDefault(); const data = new FormData(event.currentTarget); const email = data.get('email') as string; const password = data.get('password') as string; try { const response = await checkLogin({ email: email.trim(), password: password.trim() }); console.log('response', response); } catch { // } } return (
Login I need help
); }