Skip to content

Commit

Permalink
chore: redirecting indicator
Browse files Browse the repository at this point in the history
  • Loading branch information
pbastia committed Jan 16, 2025
1 parent 529a8f3 commit 9f3b308
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { customizeValidator } from "@rjsf/validator-ajv8";
import finalReviewTheme from "./formCustomization/finalReviewTheme";
import { additionalReportingDataUiSchema } from "@reporting/src/data/jsonSchema/additionalReportingData/additionalReportingData";
import { complianceSummaryUiSchema } from "@reporting/src/data/jsonSchema/complianceSummary";
import { useState } from "react";

interface Props extends HasReportVersion {
taskListElements: TaskListElement[];
Expand Down Expand Up @@ -44,10 +45,12 @@ const FinalReviewForm: React.FC<Props> = ({
data,
}) => {
const router = useRouter();
const saveAndContinueUrl = `/reports/${version_id}/sign-off`;
const saveAndContinueUrl = `/reports/${version_id}/verification`;
const backUrl = `/reports/${version_id}/attachments`;
const [isRedirecting, setIsRedirecting] = useState(false);

const submitHandler = async () => {
setIsRedirecting(true);
router.push(saveAndContinueUrl);
};

Expand All @@ -56,6 +59,7 @@ const FinalReviewForm: React.FC<Props> = ({
steps={multiStepHeaderSteps}
initialStep={4}
onSubmit={submitHandler}
isRedirecting={isRedirecting}
taskListElements={taskListElements}
cancelUrl="#"
backUrl={backUrl}
Expand Down

0 comments on commit 9f3b308

Please sign in to comment.