diff --git a/components/auth/auth-form.tsx b/components/auth/auth-form.tsx index 1a9dbd9777..728afb930a 100644 --- a/components/auth/auth-form.tsx +++ b/components/auth/auth-form.tsx @@ -2,7 +2,7 @@ import { zodResolver } from "@hookform/resolvers/zod"; import { Icon } from "@iconify/react"; -import { Button, Checkbox, Divider, Link } from "@nextui-org/react"; +import { Button, Checkbox, Divider, Link, User } from "@nextui-org/react"; import { useRouter } from "next/navigation"; import { useEffect } from "react"; import { useFormState } from "react-dom"; @@ -26,6 +26,7 @@ import { useToast } from "../ui/toast"; export const AuthForm = ({ type }: { type: string }) => { const formSchema = authFormSchema(type); const router = useRouter(); + const form = useForm>({ resolver: zodResolver(formSchema), defaultValues: { @@ -104,196 +105,198 @@ export const AuthForm = ({ type }: { type: string }) => { }; return ( -
- {/* Brand Logo and ThemeSwitch */} -
-
- - +
+ {/* Auth Form */} +
+ {/* Prowler Logo */} +
+ +
+ +
+
+

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

+ +
+ +
+ + {type === "sign-up" && ( + <> + + + + )} + + + + + {type === "sign-in" && ( +
+ + Remember me + + + Forgot password? + +
+ )} + {type === "sign-up" && ( + <> + + ( + <> + + field.onChange(e.target.checked)} + > + I agree with the  + + Terms + +   and  + + Privacy Policy + + + + + + )} + /> + + )} + + {state?.message === "Credentials error" && ( +
+ +

No user found

+
+ )} + + + {isLoading ? ( + Loading + ) : ( + {type === "sign-in" ? "Log In" : "Sign Up"} + )} + + + + + {type === "sign-in" && ( + <> +
+ +

OR

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

+ Need to create an account?  + Sign Up +

+ ) : ( +

+ Already have an account?  + Log In +

+ )}
- {/* Testimonial */} -
-

- - Open Cloud Security - -

-
- -
-

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

- -
- - {type === "sign-up" && ( - <> - - - - )} - - - - - {type === "sign-in" && ( -
- - Remember me - - - Forgot password? - -
- )} - {type === "sign-up" && ( - <> - - ( - <> - - field.onChange(e.target.checked)} - > - I agree with the  - - Terms - -   and  - - Privacy Policy - - - - - - )} - /> - - )} - - {state?.message === "Credentials error" && ( -
- -

No user found

-
- )} - - - {isLoading ? ( - Loading - ) : ( - {type === "sign-in" ? "Log In" : "Sign Up"} - )} - - - - - {type === "sign-in" && ( - <> -
- -

OR

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

- Need to create an account?  - Sign Up +

+
+

+ Open Source Security Platform

- ) : ( -

- Already have an account?  - Log In -

- )} +
);