Skip to content

Commit

Permalink
fix: pass correct type eventVisualization instead of event_visualization
Browse files Browse the repository at this point in the history
  • Loading branch information
edoardo committed Mar 1, 2024
1 parent 3535602 commit 7fb69eb
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/components/Item/VisualizationItem/ItemFooter.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import i18n from '@dhis2/d2-i18n'
import PropTypes from 'prop-types'
import React, { useState } from 'react'
import { getVisualizationId } from '../../../modules/item.js'
import { getItemUrl } from '../../../modules/itemTypes.js'
import { getItemUrl, itemTypeMap } from '../../../modules/itemTypes.js'
import FatalErrorBoundary from './FatalErrorBoundary.js'
import { InterpretationReplyForm } from './InterpretationReplyForm.js'
import classes from './styles/ItemFooter.module.css'
Expand Down Expand Up @@ -42,7 +42,10 @@ const ItemFooter = ({ item }) => {
'There was a problem loading interpretations for this item'
)}
>
<AboutAOUnit type={item.type.toLowerCase()} id={id} />
<AboutAOUnit
type={itemTypeMap[item.type]?.propName}
id={id}
/>
{interpretationId ? (
<InterpretationReplyForm
currentUser={d2.currentUser}
Expand All @@ -55,7 +58,7 @@ const ItemFooter = ({ item }) => {
) : (
<InterpretationsUnit
currentUser={d2.currentUser}
type={item.type.toLowerCase()}
type={itemTypeMap[item.type]?.propName}
id={id}
dashboardRedirectUrl={dashboardRedirectUrl}
onInterpretationClick={setViewInterpretation}
Expand Down

0 comments on commit 7fb69eb

Please sign in to comment.