Skip to content

Commit

Permalink
Fix BillingCostByAnalysis page when passing search params.
Browse files Browse the repository at this point in the history
  • Loading branch information
milo-hyben committed Jun 20, 2024
1 parent 6a0c58a commit c274e0c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion web/src/pages/billing/BillingCostByAnalysis.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ const BillingCostByAnalysis: React.FunctionComponent = () => {
}))

const [searchByType, setSearchByType] = React.useState<SearchType>(
(searchParams.get('searchType') as SearchType) ?? SearchType[0]
(SearchType[
parseInt(searchParams.get('searchType') ?? '0', 10)
] as unknown as SearchType) ?? SearchType[0]
)

// use navigate and update url params
Expand Down

0 comments on commit c274e0c

Please sign in to comment.