"use client"; import { Icon } from "@iconify/react"; import { Button, Checkbox, Divider, Input, Link } from "@nextui-org/react"; import { useState } from "react"; import { useFormState } from "react-dom"; import { authenticate } from "@/actions"; import { ProwlerExtended } from "../icons"; import { ThemeSwitch } from "../ThemeSwitch"; export const AuthForm = ({ type }: { type: string }) => { const [isVisible, setIsVisible] = useState(false); const [state, dispath] = useFormState(authenticate, undefined); console.log(state); const toggleVisibility = () => setIsVisible(!isVisible); return (
{/* Brand Logo and ThemeSwitch */}
{/* Testimonial */}

“ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc eget augue nec massa volutpat aliquet. ”

{/* Login Form */}

{type === "sign-in" ? "Sign In" : "Sign Up"}

{isVisible ? ( ) : ( )} } label="Password" name="password" placeholder="Enter your password" type={isVisible ? "text" : "password"} variant="bordered" />
Remember me Forgot password?
{type === "sign-in" && ( <>

OR

)} {type === "sign-in" ? (

Need to create an account?  Sign Up

) : (

Already have an account?  Log In

)}
); };