Skip to content

Commit

Permalink
get forecast set correct maxForecast (#333)
Browse files Browse the repository at this point in the history
  • Loading branch information
lincent authored Aug 29, 2024
1 parent 47ab9ea commit 78912eb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions air-quality-ui/src/components/summary-view/GlobalSummary.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { useQueries, useQuery } from '@tanstack/react-query'
import 'ag-grid-community/styles/ag-grid.css'
import 'ag-grid-community/styles/ag-theme-quartz.css'
import { DateTime } from 'luxon'
import { useCallback, useMemo, useState } from 'react'

import classes from './GlobalSummary.module.css'
Expand Down Expand Up @@ -35,12 +34,12 @@ const GlobalSummary = (): JSX.Element => {
} = useQuery({
queryKey: [
forecastDetails.forecastBaseDate,
forecastDetails.maxMeasurementDate,
forecastDetails.maxForecastDate,
],
queryFn: () =>
getForecastData(
forecastDetails.forecastBaseDate,
DateTime.now(),
forecastDetails.maxForecastDate,
forecastDetails.forecastBaseDate,
).then((forecastData) =>
forecastData.reduce<Record<string, ForecastResponseDto[]>>(
Expand Down

0 comments on commit 78912eb

Please sign in to comment.