File tree Expand file tree Collapse file tree
src/components/SpendRules Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import React , { useEffect } from 'react' ;
22import { View } from 'react-native' ;
3+ import type { TupleToUnion } from 'type-fest' ;
34import ActivityIndicator from '@components/ActivityIndicator' ;
45import Badge from '@components/Badge' ;
56import Icon from '@components/Icon' ;
@@ -48,7 +49,7 @@ function SpendRulesSection({policyID}: SpendRulesSectionProps) {
4849 const [ expensifyCardSettings ] = useOnyx ( `${ ONYXKEYS . COLLECTION . PRIVATE_EXPENSIFY_CARD_SETTINGS } ${ defaultFundID } ` ) ;
4950 const { cardRules, isLoadingCardRules} = useExpensifyCardRules ( policyID ) ;
5051
51- const filterCardRules = ( cardRule : ( typeof cardRules ) [ number ] , searchInput : string ) => {
52+ const filterCardRules = ( cardRule : TupleToUnion < typeof cardRules > , searchInput : string ) => {
5253 const results = tokenizedSearch ( [ cardRule ] , searchInput , ( option ) => option . searchTokens ) ;
5354 return results . length > 0 ;
5455 } ;
You can’t perform that action at this time.
0 commit comments