import {PageParams} from "@/types/next"; import {Label} from "@/components/ui/label" import {Input} from "@/components/ui/input" import Link from "next/link"; import {Button} from "@/components/ui/button"; import {LayoutAdmin} from "@/components/layout"; import {signIn} from "@/auth/auth"; import {redirect} from "next/navigation"; import {AuthError} from "@auth/core/errors"; export default async function SignInPage(props: { searchParams: { callbackUrl: string | undefined } }) { const SIGNIN_ERROR_URL = "localhost:8887" return ( //
//
//

Login

//

// Enter your email and password below to login to your account //

//
//
//
// // //
//
//
// // // Forgot your password? // //
// //
// //
//
// Don't have an account?{" "} // // Sign up // //
//
{ "use server" console.log(formData) try { console.log(formData) await signIn("credentials", formData) } catch (error) { console.log("error") // if (error instanceof AuthError) { // return redirect(`${SIGNIN_ERROR_URL}?error=${error.type}`) // } // throw error } }} >
) }