diff --git a/frontend/app/(auth)/login/components/EmailLogin/components/EmailInput.tsx b/frontend/app/(auth)/login/components/EmailLogin/components/EmailInput.tsx index 929a8004d..2d71f0c15 100644 --- a/frontend/app/(auth)/login/components/EmailLogin/components/EmailInput.tsx +++ b/frontend/app/(auth)/login/components/EmailLogin/components/EmailInput.tsx @@ -1,30 +1,26 @@ import { Fragment } from "react"; -import { useFormContext } from "react-hook-form"; -import { useTranslation } from "react-i18next"; +import { Controller } from "react-hook-form"; -import Field from "@/lib/components/ui/Field"; -import { emailPattern } from "@/lib/config/patterns"; +import { TextInput } from "@/lib/components/ui/TextInput/TextInput"; import { useAuthModes } from "@/lib/hooks/useAuthModes"; -import { EmailAuthContextType } from "../../../types"; - export const EmailInput = (): JSX.Element => { - const { register } = useFormContext(); - const { t } = useTranslation(); const { password, magicLink } = useAuthModes(); if (!password && !magicLink) { return ; } return ( - ( + + )} /> ); }; diff --git a/frontend/app/(auth)/login/components/EmailLogin/components/PasswordLogin/PasswordLogin.tsx b/frontend/app/(auth)/login/components/EmailLogin/components/PasswordLogin/PasswordLogin.tsx index 65cbff5a2..a0f5ee514 100644 --- a/frontend/app/(auth)/login/components/EmailLogin/components/PasswordLogin/PasswordLogin.tsx +++ b/frontend/app/(auth)/login/components/EmailLogin/components/PasswordLogin/PasswordLogin.tsx @@ -1,10 +1,10 @@ import { Fragment } from "react"; -import { useFormContext } from "react-hook-form"; +import { Controller, useFormContext } from "react-hook-form"; import { useTranslation } from "react-i18next"; import { EmailAuthContextType } from "@/app/(auth)/login/types"; import Button from "@/lib/components/ui/Button"; -import Field from "@/lib/components/ui/Field"; +import { TextInput } from "@/lib/components/ui/TextInput/TextInput"; import { useAuthModes } from "@/lib/hooks/useAuthModes"; import { usePasswordLogin } from "./hooks/usePasswordLogin"; @@ -13,7 +13,7 @@ export const PasswordLogin = (): JSX.Element => { const { t } = useTranslation(["login"]); const { password } = useAuthModes(); const { handlePasswordLogin } = usePasswordLogin(); - const { register, watch } = useFormContext(); + const { watch } = useFormContext(); if (!password) { return ; @@ -21,17 +21,22 @@ export const PasswordLogin = (): JSX.Element => { return (
- ( + + )} />