import { LoginForm } from "../components";
import { useAuth } from "../hooks";

export const LoginPage = () => {
  const { login } = useAuth();

  const handleOnSubmit = (data) => {
    console.log(data);
    const { email, password } = data;
    login(email, password);
  };

  return (
    <div className='flex min-h-svh w-full items-center justify-center p-6 md:p-10'>
      <div className='w-full max-w-sm'>
        <LoginForm onSubmit={handleOnSubmit} />
      </div>
    </div>
  );
};
