From 79de4dd1a79e3f2fc79672055d2fc3a26ad97a8c Mon Sep 17 00:00:00 2001 From: kleap-admin Date: Thu, 15 Jan 2026 13:42:13 +0000 Subject: [PATCH] Update components/signup.tsx --- components/signup.tsx | 230 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 230 insertions(+) create mode 100644 components/signup.tsx diff --git a/components/signup.tsx b/components/signup.tsx new file mode 100644 index 0000000..9d101f2 --- /dev/null +++ b/components/signup.tsx @@ -0,0 +1,230 @@ +"use client"; + +import { zodResolver } from "@hookform/resolvers/zod"; +import { useForm } from "react-hook-form"; +import { z } from "zod"; + +import { + Form, + FormControl, + FormField, + FormItem, + FormMessage, +} from "@/components/ui/form"; + +import Link from "next/link"; +import { cn } from "@/lib/utils"; + +import { IconBrandGithub } from "@tabler/icons-react"; +import Password from "./password"; +import { Button } from "./ui/button"; +import { Logo } from "./Logo"; + +const formSchema = z.object({ + name: z + .string({ + message: "Please enter your name", + }) + .min(1, "Please enter your name"), + email: z + .string({ + message: "Please enter email", + }) + .email("Please enter valid email") + .min(1, "Please enter email"), + password: z + .string({ + message: "Please enter password", + }) + .min(1, "Please enter password"), +}); + +export type LoginUser = z.infer; + +export function SignupForm() { + const form = useForm({ + resolver: zodResolver(formSchema), + defaultValues: { + name: "", + email: "", + password: "", + }, + }); + + async function onSubmit(_values: LoginUser) { + try { + // Handle signup logic here + } catch { + // Handle error silently + } + } + + return ( +
+
+
+
+
+ +
+

+ Sign up for an account +

+
+ +
+
+ +
+ ( + + + +
+ +
+
+ +
+ )} + /> +
+ +
+ ( + + + +
+ +
+
+ +
+ )} + /> +
+ +
+ ( + + + +
+ +
+
+ +
+ )} + /> +
+ +
+ +

+ Already have an account?{" "} + + Sign in + +

+
+ +
+ +
+
+ + +
+ +
+ +

+ By clicking on sign up, you agree to our{" "} + + Terms of Service + {" "} + and{" "} + + Privacy Policy + +

+
+
+
+
+ + ); +}