From c7f5d70dc55e5acf801ac6333298236efffe8762 Mon Sep 17 00:00:00 2001 From: HendrikThePendric Date: Mon, 24 Jun 2024 09:35:42 +0200 Subject: [PATCH] fix: use saved visualization in interpretation modal --- .../src/components/InterpretationModal/InterpretationModal.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/app/src/components/InterpretationModal/InterpretationModal.js b/packages/app/src/components/InterpretationModal/InterpretationModal.js index 219b6c18a8..bee66a1f89 100644 --- a/packages/app/src/components/InterpretationModal/InterpretationModal.js +++ b/packages/app/src/components/InterpretationModal/InterpretationModal.js @@ -3,7 +3,7 @@ import VisualizationPlugin from '@dhis2/data-visualizer-plugin' import PropTypes from 'prop-types' import React, { useState, useEffect, useCallback } from 'react' import { useSelector } from 'react-redux' -import { sGetCurrent } from '../../reducers/current.js' +import { sGetVisualization } from '../../reducers/visualization.js' import { ModalDownloadDropdown } from '../DownloadMenu/index.js' import { useInterpretationQueryParams, @@ -13,7 +13,7 @@ import { const InterpretationModal = ({ onInterpretationUpdate }, context) => { const { interpretationId, initialFocus } = useInterpretationQueryParams() const [isVisualizationLoading, setIsVisualizationLoading] = useState(false) - const visualization = useSelector(sGetCurrent) + const visualization = useSelector(sGetVisualization) useEffect(() => { setIsVisualizationLoading(!!interpretationId)