Skip to content

Commit

Permalink
feat(admin): validating a certification additional information now re…
Browse files Browse the repository at this point in the history
…direct to the certification summary page
  • Loading branch information
agarbe committed Dec 24, 2024
1 parent 1faf619 commit f3270d8
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -83,6 +83,7 @@ const AdditionalInfoForm = ({
} | null;
};
}) => {
const router = useRouter();
const {
register,
handleSubmit,
Expand Down Expand Up @@ -123,6 +124,9 @@ const AdditionalInfoForm = ({
dossierDeValidationTemplate,
},
});
router.push(
`/responsable-certifications/certifications/${certification.id}`,
);
};

return (
Expand Down

0 comments on commit f3270d8

Please sign in to comment.