From 54ca3613658d711fcb1341909f32745d28fc5398 Mon Sep 17 00:00:00 2001 From: Thomas Zemp Date: Fri, 26 Apr 2024 16:01:49 +0200 Subject: [PATCH] fix: use contextPath from systemInfo for url [DHIS2-17288] --- src/components/view/submit-modal/submit-modal.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/view/submit-modal/submit-modal.js b/src/components/view/submit-modal/submit-modal.js index 799cea9..016f572 100644 --- a/src/components/view/submit-modal/submit-modal.js +++ b/src/components/view/submit-modal/submit-modal.js @@ -143,14 +143,14 @@ const getReportText = (request) => { const ConfirmModalContent = ({ exchange, requests, onClose, onSubmit }) => { // this is very wordy, but did not have luck with i18nextscanner picking up from more compact versions... let reportTranslationsString - const { baseUrl } = useConfig() + const { systemInfo } = useConfig() const reportCount = requests.length const exchangeName = exchange?.displayName const exchangeURL = exchange?.target?.type === 'INTERNAL' - ? baseUrl + ? systemInfo?.contextPath : exchange?.target?.api?.url - const exchangeHostName = exchangeURL?.split('//')[1] // remove protocol + const exchangeHostName = exchangeURL?.split('//')[1] ?? exchangeURL // remove protocol if (exchange?.target?.type === 'INTERNAL') { if (requests.length > 1) {