Skip to content

Dev: Fix useExhaustiveDependencies — HFI Calculator #5518

@conbrad

Description

@conbrad

Describe the task
Remove biome-ignore lint/correctness/useExhaustiveDependencies comments and properly fix dep arrays in the HFI Calculator page and station admin modal.

Acceptance Criteria

  • Remove biome-ignore comments from apps/wps-web/src/features/hfiCalculator/pages/HfiCalculatorPage.tsx (7 effects: mount fetch, updatedPlanningAreaId ×2, selectedFireCentre, dateRange, fireCentres, stationsUpdateLoading)
  • Remove biome-ignore comments from apps/wps-web/src/features/hfiCalculator/components/stationAdmin/ManageStationsModal.tsx (line 85)
  • yarn biome lint passes with zero useExhaustiveDependencies errors on both files
  • Page loads and fetches stations on mount
  • Switching fire centres shows loading indicator and fetches the correct date range
  • No repeated API calls visible in the network tab

Additional context

  • CAUTION: a previous attempt here introduced an API flood loop and a lost loading indicator when switching fire centres. The mount effect and the fireCentres/selectedFireCentre interaction are particularly sensitive.
  • Use useRef to read current values without subscribing if needed to break dep cycles.

Metadata

Metadata

Assignees

No one assigned

    Labels

    4Refinementthis ticket is ready for refinement with the teamTaskTechnical task that cannot be written as a user story

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions