From f3270d8b94e16c6c40b8419ff8d56a78ad3856d2 Mon Sep 17 00:00:00 2001 From: Alexandre Garbe Date: Tue, 24 Dec 2024 10:19:47 +0100 Subject: [PATCH] feat(admin): validating a certification additional information now redirect to the certification summary page --- .../[certificationId]/additional-info/page.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/reva-admin-react/src/app/responsable-certifications/certifications/[certificationId]/additional-info/page.tsx b/packages/reva-admin-react/src/app/responsable-certifications/certifications/[certificationId]/additional-info/page.tsx index eeea7ec3f..50e3d3fbc 100644 --- a/packages/reva-admin-react/src/app/responsable-certifications/certifications/[certificationId]/additional-info/page.tsx +++ b/packages/reva-admin-react/src/app/responsable-certifications/certifications/[certificationId]/additional-info/page.tsx @@ -5,7 +5,7 @@ import { FormButtons } from "@/components/form/form-footer/FormButtons"; import Breadcrumb from "@codegouvfr/react-dsfr/Breadcrumb"; import Input from "@codegouvfr/react-dsfr/Input"; import { useUpdateAdditionalInfoPage } from "./useCertificationAdditionalInfo.hook"; -import { useParams } from "next/navigation"; +import { useParams, useRouter } from "next/navigation"; import { z } from "zod"; import { zodResolver } from "@hookform/resolvers/zod"; import { useForm } from "react-hook-form"; @@ -83,6 +83,7 @@ const AdditionalInfoForm = ({ } | null; }; }) => { + const router = useRouter(); const { register, handleSubmit, @@ -123,6 +124,9 @@ const AdditionalInfoForm = ({ dossierDeValidationTemplate, }, }); + router.push( + `/responsable-certifications/certifications/${certification.id}`, + ); }; return (