Skip to content

Commit

Permalink
[Tech] use areRegulatoryResultsOpen instead of `isRegulatorySearchR…
Browse files Browse the repository at this point in the history
…esultsVisible`
  • Loading branch information
claire2212 committed Nov 12, 2024
1 parent 40672ec commit 36f6f1f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export function ResultList({ searchedText }: ResultListProps) {

const { data: regulatoryLayers } = useGetRegulatoryLayersQuery()
const regulatoryLayersByLayerName = groupBy(
!regulatoryLayersSearchResult && isRegulatorySearchResultsVisible
!regulatoryLayersSearchResult && areRegulatoryResultsOpen
? regulatoryLayers?.ids
: regulatoryLayersSearchResult ?? [],
r => regulatoryLayers?.entities[r]?.layer_name
Expand All @@ -63,7 +63,7 @@ export function ResultList({ searchedText }: ResultListProps) {

const { data: amps } = useGetAMPsQuery()
const ampResultsByAMPName = groupBy(
!ampsSearchResult && isAmpSearchResultsVisible ? amps?.ids : ampsSearchResult ?? [],
!ampsSearchResult && areAmpsResultsOpen ? amps?.ids : ampsSearchResult ?? [],
a => amps?.entities[a]?.name
)
const totalAmps = ampsSearchResult?.length ?? amps?.ids?.length ?? 0
Expand Down

0 comments on commit 36f6f1f

Please sign in to comment.