Skip to content

Commit

Permalink
fix: fix double fetch on homepage ulam
Browse files Browse the repository at this point in the history
  • Loading branch information
lwih committed Jan 22, 2025
1 parent f0224d5 commit 24abde3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frontend/src/v2/pages/mission-list-ulam-page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Mission } from '@common/types/mission-types.ts'
import { Accent, Button, Icon } from '@mtes-mct/monitor-ui'
import { endOfMonth } from 'date-fns'
import { endOfMonth, startOfMonth } from 'date-fns'
import React, { useState } from 'react'
import { Stack } from 'rsuite'
import MissionListDateRangeNavigator from '../features/common/components/elements/mission-list-daterange-navigator.tsx'
Expand All @@ -27,7 +27,7 @@ const SIDEBAR_ITEMS = [
const MissionListUlamPage: React.FC = () => {
const today = new Date()
const [queryParams, setQueryParams] = useState({
startDateTimeUtc: today.toISOString(),
startDateTimeUtc: startOfMonth(today).toISOString(),
endDateTimeUtc: endOfMonth(today).toISOString()
})
const [isDialogOpen, setIsDialogOpen] = useState(false)
Expand All @@ -38,7 +38,7 @@ const MissionListUlamPage: React.FC = () => {

const { getMissionListItem } = useMissionList()
const { isLoading, data: missions } = useMissionsQuery(queryParams)
const { exportMissionReport, loading: exportIsLoading } = useMissionReportExport()
const { exportMissionReport, exportIsLoading } = useMissionReportExport()

Check warning on line 41 in frontend/src/v2/pages/mission-list-ulam-page.tsx

View workflow job for this annotation

GitHub Actions / build-and-test-frontend

'exportIsLoading' is assigned a value but never used

const handleUpdateDateTime = (currentDate: Date) => {
const newDateRange = {
Expand Down

0 comments on commit 24abde3

Please sign in to comment.