From c289d78d1a7900f86b15ba46a0507fa8df337fcd Mon Sep 17 00:00:00 2001 From: GandalfGwaihir Date: Tue, 7 May 2024 18:57:59 +0530 Subject: [PATCH] Use vilations at requried places --- src/components/MoneyRequestConfirmationList.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/MoneyRequestConfirmationList.tsx b/src/components/MoneyRequestConfirmationList.tsx index 7ad849282e88..038d864c4c10 100755 --- a/src/components/MoneyRequestConfirmationList.tsx +++ b/src/components/MoneyRequestConfirmationList.tsx @@ -556,7 +556,7 @@ function MoneyRequestConfirmationList({ } // Keep 'transaction' out to ensure that we autoselect the option only once // eslint-disable-next-line react-hooks/exhaustive-deps - }, [policyTagLists, policyTags, canUseViolations]); + }, [policyTagLists, policyTags]); /** */ @@ -870,14 +870,14 @@ function MoneyRequestConfirmationList({ titleStyle={styles.flex1} disabled={didConfirm} interactive={!isReadOnly} - rightLabel={isCategoryRequired ? translate('common.required') : ''} + rightLabel={isCategoryRequired && canUseViolations ? translate('common.required') : ''} /> ), shouldShow: shouldShowCategories, isSupplementary: action === CONST.IOU.ACTION.CATEGORIZE ? false : !isCategoryRequired, }, ...policyTagLists.map(({name, required}, index) => { - const isTagRequired = required === undefined ? false : canUseViolations && required; + const isTagRequired = required ?? false; return { item: ( ), shouldShow: shouldShowTags,