Skip to content

Commit

Permalink
fix: interpretation url adjustment for maps urls
Browse files Browse the repository at this point in the history
  • Loading branch information
jenniferarnesen committed Dec 20, 2023
1 parent 72bc81d commit 0d33d0a
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ export const Interpretation = ({
}
}

// Maps still uses old url style /?id= instead of hash
const appInterpretationUrl = dashboardRedirectUrl.includes('?')
? `${dashboardRedirectUrl}&interpretationId=${interpretation.id}`
: `${dashboardRedirectUrl}?interpretationId=${interpretation.id}`

return isUpdateMode ? (
<InterpretationUpdateForm
close={() => setIsUpdateMode(false)}
Expand Down Expand Up @@ -115,10 +120,7 @@ export const Interpretation = ({
tooltipContent={i18n.t('Open in app')}
iconComponent={IconLaunch16}
onClick={() =>
window.open(
`${dashboardRedirectUrl}?interpretationId=${interpretation.id}`,
'_blank'
)
window.open(appInterpretationUrl, '_blank')
}
dataTest="interpretation-launch-in-app-button"
/>
Expand Down

0 comments on commit 0d33d0a

Please sign in to comment.