Skip to content

Commit

Permalink
fix: use contextPath from systemInfo for url [DHIS2-17288]
Browse files Browse the repository at this point in the history
  • Loading branch information
tomzemp committed Apr 26, 2024
1 parent 110525e commit 54ca361
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/view/submit-modal/submit-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 54ca361

Please sign in to comment.