From 6449d85a06d6d0540347449c44455dd4687b0aa0 Mon Sep 17 00:00:00 2001 From: M <120020483+VWSCoronaDashboard30@users.noreply.github.com> Date: Wed, 20 Mar 2024 09:27:10 +0100 Subject: [PATCH] feature(COR-1953): Fixed sewer branch last insertion date not displaying --- packages/app/src/domain/sewer/sewer-chart/sewer-chart.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/app/src/domain/sewer/sewer-chart/sewer-chart.tsx b/packages/app/src/domain/sewer/sewer-chart/sewer-chart.tsx index 54a456df18..8cb7621011 100644 --- a/packages/app/src/domain/sewer/sewer-chart/sewer-chart.tsx +++ b/packages/app/src/domain/sewer/sewer-chart/sewer-chart.tsx @@ -16,7 +16,6 @@ import { useCallback, useEffect, useMemo, useState } from 'react'; import { useIntl } from '~/intl'; import { useRouter } from 'next/router'; import { useScopedWarning } from '~/utils/use-scoped-warning'; -import { useValuesInTimeframe } from '~/components/time-series-chart/logic'; import { Warning } from '@corona-dashboard/icons'; import { WarningTile } from '~/components/warning-tile'; import styled from 'styled-components'; @@ -91,10 +90,10 @@ export const SewerChart = ({ accessibility, dataAverages, dataPerInstallation, t const [sewerTimeframe, setSewerTimeframe] = useState(TimeframeOption.ALL); const router = useRouter(); - const values = useValuesInTimeframe(dataAverages.values, timeframe); const [sewerChartTimeInterval, setSewerChartTimeInterval] = useState({ start: 0, end: 0 }); - const metadataLastInsertionDate = getDateFromValues(values); + + const metadataLastInsertionDate = getDateFromValues(dataAverages); const scopedGmName = commonTexts.gemeente_index.municipality_warning; const scopedWarning = useScopedWarning(vrNameOrGmName || '', warning || '');