From 22170d04e71719bc7100d6014ec85b2fcc07c3a5 Mon Sep 17 00:00:00 2001 From: M <120020483+VWSCoronaDashboard30@users.noreply.github.com> Date: Wed, 13 Mar 2024 11:00:47 +0100 Subject: [PATCH] feat(COR-1953): Added corrections for rioolwater NL and infectieradar pages (#5005) Signed-off-by: M <120020483+VWSCoronaDashboard30@users.noreply.github.com> --- 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 66bfed0db2..1987340f35 100644 --- a/packages/app/src/domain/sewer/sewer-chart/sewer-chart.tsx +++ b/packages/app/src/domain/sewer/sewer-chart/sewer-chart.tsx @@ -4,6 +4,7 @@ import { ChartTile } from '~/components/chart-tile'; import { ChartTimeControls } from '~/components/chart-time-controls'; import { colors, NlSewer, SewerPerInstallationData, TimeframeOption, TimeframeOptionsList } from '@corona-dashboard/common'; import { DateRange } from '~/components/metadata'; +import { getDateFromValues } from '~/utils/get-last-insertion-date-of-page'; import { isPresent } from 'ts-is-present'; import { mediaQueries, space } from '~/style/theme'; import { mergeData, useSewerStationSelectPropsSimplified } from './logic'; @@ -19,7 +20,6 @@ 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'; -import { getDateFromValues } from '~/utils/get-last-insertion-date-of-page'; interface SewerChartProps { /** @@ -91,10 +91,9 @@ 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 || '');