diff --git a/public/eye-hide.png b/public/eye-hide.png new file mode 100644 index 0000000..629dd3f Binary files /dev/null and b/public/eye-hide.png differ diff --git a/public/eye.png b/public/eye.png new file mode 100644 index 0000000..141283e Binary files /dev/null and b/public/eye.png differ diff --git a/src/app/auth/page.module.css b/src/app/auth/page.module.css index e2d5b09..05328ef 100644 --- a/src/app/auth/page.module.css +++ b/src/app/auth/page.module.css @@ -71,3 +71,22 @@ cursor: pointer; color: var(--slate-black); } + +.passwordContainer{ + position: relative; + +} + +.passwordToggle{ + position: absolute; + height: 100%; + display: flex; + top: 0; + align-items: center; + right: 1rem +} + +.image{ + height: 25px; + width: 25px; +} \ No newline at end of file diff --git a/src/app/auth/page.tsx b/src/app/auth/page.tsx index 65bdc43..91afe6b 100644 --- a/src/app/auth/page.tsx +++ b/src/app/auth/page.tsx @@ -7,10 +7,15 @@ import { toast } from "sonner"; import { loginSchema, signupSchema } from "@/lib/zod"; import { signIn } from "next-auth/react"; import { useRouter, useSearchParams } from "next/navigation"; +import eye from "../../../public/eye.png" +import hide from "../../../public/eye-hide.png" +import Image from 'next/image'; export default function Auth() { const [isSignup, setIsSignup] = useState(false); const [isLoading, setIsLoading] = useState(false); + const [hidden, setHidden] = useState(true); + const [confirmHidden, setConfirmHidden] = useState(true); const router = useRouter(); const searchParams = useSearchParams(); const callback = searchParams.get("callbackUrl"); @@ -161,27 +166,46 @@ export default function Auth() { {errors.email.message?.toString()}
)} - - +{errors.password.message?.toString()}
)} - +{errors.confirmPassword.message?.toString()} @@ -214,14 +238,23 @@ export default function Auth() { {errors.loginIdentifier.message?.toString()}
)} - - +{errors.password.message?.toString()}