Commit 001d4568 authored by Guilhem CARRON's avatar Guilhem CARRON
Browse files

Merge branch 'fix/konnector-refresh-graph-data' into 'dev'

fix(conso): konnector-refresh-graph-data

See merge request web-et-numerique/llle_project/ecolyo!460
parents 889a2ba8 bd5c3e88
......@@ -15,7 +15,6 @@ import StyledSwitch from 'components/CommonKit/Switch/StyledSwitch'
import TimeStepSelector from 'components/TimeStepSelector/TimeStepSelector'
import ActivateHalfHourLoad from 'components/ActivateHalfHourLoad/ActivateHalfHourLoad'
import FluidChartSwipe from './FluidChartSwipe'
import ConsumptionVisualizer from 'components/ConsumptionVisualizer/ConsumptionVisualizer'
import { UsageEventType } from 'enum/usageEvent.enum'
import UsageEventService from 'services/usageEvent.service'
......
......@@ -37,6 +37,12 @@ const ConsumptionView: React.FC<ConsumptionViewProps> = ({
)
const [active, setActive] = useState<boolean>(false)
/* eslint-disable @typescript-eslint/no-non-null-assertion */
const lastDataDate = fluidStatus[fluidType].lastDataDate
? fluidStatus[fluidType].lastDataDate!.toLocaleString()
: ''
const defineHeaderHeight = useCallback((height: number) => {
setHeaderHeight(height)
}, [])
......@@ -74,7 +80,11 @@ const ConsumptionView: React.FC<ConsumptionViewProps> = ({
['--hidden']: loading,
})}
>
<FluidChart fluidType={fluidType} setActive={setActive} />
<FluidChart
fluidType={fluidType}
setActive={setActive}
key={lastDataDate}
/>
<ConsumptionDetails fluidType={fluidType} />
</div>
{!isMulti && (
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment