From 82907ee24912e95b9f8c381bc87cd4bd3579c7f9 Mon Sep 17 00:00:00 2001 From: Hendrik de Graaf Date: Mon, 24 Jun 2024 14:37:40 +0200 Subject: [PATCH] fix: use saved visualization in interpretation modal [v39] (#3122) --- .../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)