Skip to content

Commit

Permalink
chore: add link to contacts address error
Browse files Browse the repository at this point in the history
  • Loading branch information
BCerki committed Jan 16, 2025
1 parent d13e545 commit 59acbb0
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
import { FormMode, FrontEndRoles } from "@bciers/utils/src/enums";
import { useSessionRole } from "@bciers/utils/src/sessionUtils";
import Note from "@bciers/components/layout/Note";
import Link from "next/link";

const OperationInformationForm = ({
formData,
Expand Down Expand Up @@ -49,6 +50,15 @@ const OperationInformationForm = ({
);

if (response?.error) {
if (response.error.includes("Please return to Contacts")) {
const splitError = response.error.split("Contacts");
response.error = (
<>
{splitError[0]} <Link href={"/contacts"}>Contacts</Link>
{splitError[1]}
</>
);
}
setError(response.error);
return { error: response.error };
}
Expand Down

0 comments on commit 59acbb0

Please sign in to comment.