"use client" import { useState } from "react" import Link from "next/link" import { useRouter } from "next/navigation" import { zodResolver } from "@hookform/resolvers/zod" import { Controller, useForm } from "react-hook-form" import { z } from "zod" import { ArrowLeft, Eye, EyeOff } from "lucide-react" import { Button } from "@/components/ui/button" import { Checkbox } from "@/components/ui/checkbox" import { Field, FieldError, FieldGroup, FieldLabel } from "@/components/ui/field" import { Input } from "@/components/ui/input" const loginSchema = z.object({ email: z.string().min(1, "Email is required").email("Enter a valid email"), password: z.string().min(1, "Password is required"), agreeToTerms: z.literal(true, { error: "You must agree to the Terms & Condition", }), }) type LoginValues = z.infer function GoogleIcon() { return ( ) } function FacebookIcon() { return ( ) } export default function LoginPage() { const router = useRouter() const [showPassword, setShowPassword] = useState(false) const form = useForm({ resolver: zodResolver(loginSchema), defaultValues: { email: "", password: "", agreeToTerms: true }, }) const onSubmit = form.handleSubmit(async (values) => { // TODO: wire up to the auth API once it exists console.log(values) router.push("/dashboard") }) return (

Log in

Don't have an account?{" "} Create an Account

Email Address Password
Forgot Password?
( )} />
or
) }