From 23590cab874b48c72eef2fc873a12621a6ec75ce Mon Sep 17 00:00:00 2001 From: Claudia Malzer Date: Mon, 12 Feb 2024 16:51:41 +0100 Subject: [PATCH] ERM-3041 Dashboard: the "unsaved changes" confirmation modal is missing * pass string instead of object to ConfirmationModals heading --- lib/hooks/useErmForm.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/hooks/useErmForm.js b/lib/hooks/useErmForm.js index a507b97c..11bd6311 100644 --- a/lib/hooks/useErmForm.js +++ b/lib/hooks/useErmForm.js @@ -4,7 +4,7 @@ import { Form as FinalForm, FormSpy } from 'react-final-form'; import { useHistory } from 'react-router-dom'; import createDecorator from 'final-form-focus'; import arrayMutators from 'final-form-arrays'; -import { FormattedMessage } from 'react-intl'; +import { FormattedMessage, useIntl } from 'react-intl'; import { LastVisitedContext } from '@folio/stripes/core'; import { ConfirmationModal } from '@folio/stripes/components'; @@ -16,6 +16,7 @@ const useErmForm = ({ navigationCheck = true } = {}) => { const [dirty, setDirty] = useState(false); const history = useHistory(); + const intl = useIntl(); useEffect(() => { if (navigationCheck) { @@ -80,7 +81,7 @@ const useErmForm = ({ navigationCheck = true } = {}) => { } confirmLabel={} - heading={} + heading={intl.formatMessage({ id: 'stripes-form.areYouSure' })} id="cancel-editing-confirmation" message={} onCancel={() => continueNavigation(ctx)}