diff --git a/apps/website/pages/reset-password/index.tsx b/apps/website/pages/reset-password/index.tsx index 1bb369b..4680a78 100644 --- a/apps/website/pages/reset-password/index.tsx +++ b/apps/website/pages/reset-password/index.tsx @@ -1,6 +1,6 @@ import delve from "dlv"; import axios from "axios"; -import {SubmitHandler, useForm} from "react-hook-form"; +import {FieldError, SubmitHandler, useForm} from "react-hook-form"; import SeoConfig from "../../components/seo-config/seo-config"; import Layout from "../../components/layout/layout"; @@ -112,10 +112,10 @@ export function ResetPassword({menuHeaders, menuFooter, page, seo}) { name="password" id="password" {...register("password", {required: "Le mot de passe est requis", minLength: 8})} - className={errors.email ? 'bg-red-50 border border-red-500 text-red-900 placeholder-red-700 text-sm rounded-lg focus:ring-red-500 dark:bg-gray-700 focus:border-red-500 block w-full p-2.5 dark:text-red-500 dark:placeholder-red-500 dark:border-red-500' : 'bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full pr-10 p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:placeholder-gray-400 dark:text-white'}/> + className={errors.password ? 'bg-red-50 border border-red-500 text-red-900 placeholder-red-700 text-sm rounded-lg focus:ring-red-500 dark:bg-gray-700 focus:border-red-500 block w-full p-2.5 dark:text-red-500 dark:placeholder-red-500 dark:border-red-500' : 'bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full pr-10 p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:placeholder-gray-400 dark:text-white'}/> {errors.password && errors.password.type !== "minLength" && (
{errors.password.message}
)} + className="mt-2 text-sm text-red-600 dark:text-red-500">{(errors.password as FieldError).message})} {errors.password && errors.password.type === "minLength" && (Le mot de passe doit avoir une @@ -142,7 +142,7 @@ export function ResetPassword({menuHeaders, menuFooter, page, seo}) { className={errors.password ? 'bg-red-50 border border-red-500 text-red-900 placeholder-red-700 text-sm rounded-lg focus:ring-red-500 dark:bg-gray-700 focus:border-red-500 block w-full p-2.5 dark:text-red-500 dark:placeholder-red-500 dark:border-red-500' : 'bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full pr-10 p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:placeholder-gray-400 dark:text-white'}/> {errors.passwordConfirmation && (
{errors.passwordConfirmation.message}
)} + className="mt-2 text-sm text-red-600 dark:text-red-500">{(errors.passwordConfirmation as FieldError).message})}