Skip to content

Commit

Permalink
Import questionnaire form - fix success toast message
Browse files Browse the repository at this point in the history
The message displayed on successful import of a questionnaire did
not exist in the translation file.  The message key now uses an
existing message to say:

  "Questionnaire <Name Used> was successfully created."

Signed-off-by: Scott J Dickerson <[email protected]>
  • Loading branch information
sjd78 committed Sep 21, 2023
1 parent 44a40e8 commit c7b6a2f
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,13 @@ export const ImportQuestionnaireForm: React.FC<
trigger,
} = methods;

const onHandleSuccessfullQuestionnaireCreation = (
response: Questionnaire
) => {
const onHandleSuccessfulQuestionnaireCreation = (response: Questionnaire) => {
onSaved(response);
pushNotification({
title: t("toastr.success.questionnaireCreated"),
title: t("toastr.success.createWhat", {
type: t("terms.questionnaire"),
what: response.name,
}),
variant: "success",
});
onSaved();
Expand All @@ -75,7 +76,7 @@ export const ImportQuestionnaireForm: React.FC<
};

const { mutate: createQuestionnaire } = useCreateQuestionnaireMutation(
onHandleSuccessfullQuestionnaireCreation,
onHandleSuccessfulQuestionnaireCreation,
onHandleFailedQuestionnaireCreation
);

Expand Down

0 comments on commit c7b6a2f

Please sign in to comment.