Skip to content

Commit

Permalink
fix: use saved visualization in interpretation modal [v39] (#3122)
Browse files Browse the repository at this point in the history
  • Loading branch information
HendrikThePendric authored Jun 24, 2024
1 parent d3fa8fb commit 82907ee
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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)
Expand Down

0 comments on commit 82907ee

Please sign in to comment.