Skip to content

Commit afce60e

Browse files
committed
use tuple to union
1 parent 18d9fd0 commit afce60e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/components/SpendRules/SpendRulesSection.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React, {useEffect} from 'react';
22
import {View} from 'react-native';
3+
import type {TupleToUnion} from 'type-fest';
34
import ActivityIndicator from '@components/ActivityIndicator';
45
import Badge from '@components/Badge';
56
import 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
};

0 commit comments

Comments
 (0)