|
|
|
@ -1,6 +1,6 @@
|
|
|
|
import delve from "dlv";
|
|
|
|
import delve from "dlv";
|
|
|
|
import axios from "axios";
|
|
|
|
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 SeoConfig from "../../components/seo-config/seo-config";
|
|
|
|
import Layout from "../../components/layout/layout";
|
|
|
|
import Layout from "../../components/layout/layout";
|
|
|
|
@ -112,10 +112,10 @@ export function ResetPassword({menuHeaders, menuFooter, page, seo}) {
|
|
|
|
name="password"
|
|
|
|
name="password"
|
|
|
|
id="password"
|
|
|
|
id="password"
|
|
|
|
{...register("password", {required: "Le mot de passe est requis", minLength: 8})}
|
|
|
|
{...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 && errors.password.type !== "minLength" && (
|
|
|
|
<p
|
|
|
|
<p
|
|
|
|
className="mt-2 text-sm text-red-600 dark:text-red-500">{errors.password.message}</p>)}
|
|
|
|
className="mt-2 text-sm text-red-600 dark:text-red-500">{(errors.password as FieldError).message}</p>)}
|
|
|
|
{errors.password && errors.password.type === "minLength" && (
|
|
|
|
{errors.password && errors.password.type === "minLength" && (
|
|
|
|
<p className="mt-2 text-sm text-red-600 dark:text-red-500">Le mot de passe doit avoir
|
|
|
|
<p className="mt-2 text-sm text-red-600 dark:text-red-500">Le mot de passe doit avoir
|
|
|
|
une
|
|
|
|
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'}/>
|
|
|
|
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 && (
|
|
|
|
<p
|
|
|
|
<p
|
|
|
|
className="mt-2 text-sm text-red-600 dark:text-red-500">{errors.passwordConfirmation.message}</p>)}
|
|
|
|
className="mt-2 text-sm text-red-600 dark:text-red-500">{(errors.passwordConfirmation as FieldError).message}</p>)}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</section>
|
|
|
|
|