"use client"; import type React from "react"; import { Loader2, Lock } from "lucide-react"; import { Button } from "@/app/_components/ui/button"; import { Input } from "@/app/_components/ui/input"; import { SubmitButton } from "@/app/_components/submit-button"; import Link from "next/link"; import { FormField } from "@/app/_components/form-field"; import { useSignInController } from "@/src/interface-adapters/controllers/auth/sign-in-controller"; import { useState } from "react"; import { signIn } from "../action"; export function SignInForm({ className, ...props }: React.ComponentPropsWithoutRef<"form">) { const [error, setError] = useState(); const [loading, setLoading] = useState(false); const onSubmit = async (event: React.FormEvent) => { event.preventDefault(); if (loading) return; const formData = new FormData(event.currentTarget); setLoading(true); const res = await signIn(formData); if (res && res.error) { setError(res.error); } setLoading(false); }; // const { register, isPending, handleSubmit, errors } = useSignInController(); return (

Welcome back

Sign in to your account

{/* {message && (
{message}
)} */}
or
} error={error ? error : undefined} />
Don't have an account? Contact Us

By continuing, you agree to Sigap's{" "} Terms of Service {" "} and{" "} Privacy Policy , and to receive periodic emails with updates.

); }