From c171b3d26189206e546361911e31f887082ee136 Mon Sep 17 00:00:00 2001 From: Jen Jones Arnesen Date: Mon, 25 Sep 2023 09:28:46 +0200 Subject: [PATCH] fix: accept both lowercase and camelCase interpretationId in url(#2937) Needed for: https://dhis2.atlassian.net/browse/DHIS2-15441 The analytics interpretation component sends a camelcase interpretationId url parameter. This same format is used in DV and LL. Including both lowercase and camelcase ensures that this version of maps isn't dependent on also having the updated dashboard app --- src/components/interpretations/Interpretations.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/interpretations/Interpretations.js b/src/components/interpretations/Interpretations.js index ef7cb361c..c937e5ef9 100644 --- a/src/components/interpretations/Interpretations.js +++ b/src/components/interpretations/Interpretations.js @@ -15,7 +15,10 @@ const Interpretations = ({ renderCount }) => { useEffect(() => { if (isMapLoaded) { - const urlInterpretationId = getUrlParameter('interpretationid') + // analytics interpretation component uses camelcase + const urlInterpretationId = + getUrlParameter('interpretationid') || + getUrlParameter('interpretationId') if (urlInterpretationId) { dispatch(setInterpretation(urlInterpretationId))