diff --git a/client/src/Pages/Account/TabPassword.tsx b/client/src/Pages/Account/TabPassword.tsx index cd07410ac..cdf7ce4c4 100644 --- a/client/src/Pages/Account/TabPassword.tsx +++ b/client/src/Pages/Account/TabPassword.tsx @@ -1,24 +1,51 @@ import { Stack } from "@mui/material"; import { ConfigBox } from "@/Components/v2/design-elements"; -import { TextField } from "@/Components/v2/inputs"; +import { TextField, Button } from "@/Components/v2/inputs"; import { useTranslation } from "react-i18next"; import { useTheme } from "@mui/material"; +import { useForm, Controller } from "react-hook-form"; +import { usePasswordForm } from "@/Hooks/usePasswordForm"; +import type { PasswordFormData } from "@/Validation/password"; export const TabPassword = () => { const { t } = useTranslation(); const theme = useTheme(); + const { resolver, defaults } = usePasswordForm(); + + const { control, handleSubmit } = useForm({ + resolver, + defaultValues: defaults, + }); + + const onSubmit = (data: PasswordFormData) => { + console.log("Password form data:", data); + }; return ( - + ( + + )} /> } /> @@ -27,21 +54,53 @@ export const TabPassword = () => { subtitle={t("pages.account.form.newPassword.description")} rightContent={ - ( + )} /> - ( + + )} /> } /> + ); };