diff --git a/.eslintrc.js b/.eslintrc.js
index cfbfdcc8fe91..fefad92ce29d 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -294,6 +294,7 @@ module.exports = {
files: ['*.ts', '*.tsx'],
rules: {
'rulesdir/prefer-at': 'error',
+ 'rulesdir/boolean-conditional-rendering': 'error',
},
},
],
diff --git a/src/components/AccountSwitcher.tsx b/src/components/AccountSwitcher.tsx
index 8ccab44a2cb9..ad58294c0cc8 100644
--- a/src/components/AccountSwitcher.tsx
+++ b/src/components/AccountSwitcher.tsx
@@ -152,7 +152,7 @@ function AccountSwitcher() {
>
{currentUserPersonalDetails?.displayName}
- {canSwitchAccounts && (
+ {!!canSwitchAccounts && (
- {canSwitchAccounts && (
+ {!!canSwitchAccounts && (
{
diff --git a/src/components/Attachments/AttachmentCarousel/CarouselItem.tsx b/src/components/Attachments/AttachmentCarousel/CarouselItem.tsx
index 103abb2df1bb..4de43a763231 100644
--- a/src/components/Attachments/AttachmentCarousel/CarouselItem.tsx
+++ b/src/components/Attachments/AttachmentCarousel/CarouselItem.tsx
@@ -86,7 +86,7 @@ function CarouselItem({item, onPress, isFocused, isModalHovered}: CarouselItemPr
/>
- {item.hasBeenFlagged && (
+ {!!item.hasBeenFlagged && (
{({safeAreaPaddingBottomStyle}) => {renderButton([styles.m4, styles.alignSelfCenter])}}
diff --git a/src/components/Attachments/AttachmentView/DefaultAttachmentView/index.tsx b/src/components/Attachments/AttachmentView/DefaultAttachmentView/index.tsx
index 23e13833df64..8f149182d9a6 100644
--- a/src/components/Attachments/AttachmentView/DefaultAttachmentView/index.tsx
+++ b/src/components/Attachments/AttachmentView/DefaultAttachmentView/index.tsx
@@ -47,7 +47,7 @@ function DefaultAttachmentView({fileName = '', shouldShowLoadingSpinnerIcon = fa
{fileName}
- {!shouldShowLoadingSpinnerIcon && shouldShowDownloadIcon && (
+ {!shouldShowLoadingSpinnerIcon && !!shouldShowDownloadIcon && (
- {report && !!title && (
+ {!!report && !!title && (
- {errorData.validationError && (
+ {!!errorData.validationError && (
- {icon && (
+ {!!icon && (
- {shouldShowIcon && icon && (
+ {shouldShowIcon && !!icon && (
(
<>
- {subtitle && (
+ {!!subtitle && (
- {animation && (
+ {!!animation && (
)}
- {icon && (
+ {!!icon && (
- {icon && (
+ {!!icon && (
({
enterKeyEventListenerPriority={enterKeyEventListenerPriority}
/>
)}
- {(shouldAlwaysShowDropdownMenu || options.length > 1) && popoverAnchorPosition && (
+ {(shouldAlwaysShowDropdownMenu || options.length > 1) && !!popoverAnchorPosition && (
{
diff --git a/src/components/CheckboxWithLabel.tsx b/src/components/CheckboxWithLabel.tsx
index db62aa9e1441..0647b495bd33 100644
--- a/src/components/CheckboxWithLabel.tsx
+++ b/src/components/CheckboxWithLabel.tsx
@@ -95,8 +95,8 @@ function CheckboxWithLabel(
style={[styles.flexRow, styles.alignItemsCenter, styles.noSelect, styles.w100]}
wrapperStyle={[styles.ml3, styles.pr2, styles.w100, styles.flexWrap, styles.flexShrink1]}
>
- {label && {label}}
- {LabelComponent && }
+ {!!label && {label}}
+ {!!LabelComponent && }
diff --git a/src/components/CollapsibleSection/index.tsx b/src/components/CollapsibleSection/index.tsx
index d339f005e3d3..3776dfa2cf9b 100644
--- a/src/components/CollapsibleSection/index.tsx
+++ b/src/components/CollapsibleSection/index.tsx
@@ -63,7 +63,7 @@ function CollapsibleSection({title, children, titleStyle, textStyle, wrapperStyl
src={src}
/>
- {shouldShowSectionBorder && }
+ {!!shouldShowSectionBorder && }
{children}
diff --git a/src/components/ConfirmContent.tsx b/src/components/ConfirmContent.tsx
index bda78b9b320d..cb0fc6e8e8cb 100644
--- a/src/components/ConfirmContent.tsx
+++ b/src/components/ConfirmContent.tsx
@@ -168,7 +168,7 @@ function ConfirmContent({
)}
- {iconSource && (
+ {!!iconSource && (
- {title && {titleAlreadyTranslated ?? translate(title)}}
+ {!!title && {titleAlreadyTranslated ?? translate(title)}}
{children}
>
);
diff --git a/src/components/DecisionModal.tsx b/src/components/DecisionModal.tsx
index a9bd0b204d79..927ba1ecab11 100644
--- a/src/components/DecisionModal.tsx
+++ b/src/components/DecisionModal.tsx
@@ -55,7 +55,7 @@ function DecisionModal({title, prompt = '', firstOptionText, secondOptionText, o
{prompt}
- {firstOptionText && (
+ {!!firstOptionText && (
- {isReceiptThumbnail && fileExtension && (
+ {isReceiptThumbnail && !!fileExtension && (
)}
- {ctaErrorMessage && (
+ {!!ctaErrorMessage && (
)}
- {icon && (
+ {!!icon && (
)}
- {policyAvatar && (
+ {!!policyAvatar && (
- {stepNames && (
+ {!!stepNames && (
{}, opti
/>
)}
- {hasDraftComment && optionItem.isAllowedToComment && (
+ {hasDraftComment && !!optionItem.isAllowedToComment && (
{}, opti
/>
)}
- {!shouldShowGreenDotIndicator && !hasBrickError && optionItem.isPinned && (
+ {!shouldShowGreenDotIndicator && !hasBrickError && !!optionItem.isPinned && (
))}
- {errorText && (
+ {!!errorText && (
- {coordinates && (
+ {!!coordinates && (
(
);
})}
- {directionCoordinates && }
+ {!!directionCoordinates && }
{interactive && (
diff --git a/src/components/MapView/MapViewImpl.website.tsx b/src/components/MapView/MapViewImpl.website.tsx
index 7df277671043..14db96fff812 100644
--- a/src/components/MapView/MapViewImpl.website.tsx
+++ b/src/components/MapView/MapViewImpl.website.tsx
@@ -272,7 +272,7 @@ const MapViewImpl = forwardRef(
);
})}
- {directionCoordinates && }
+ {!!directionCoordinates && }
{interactive && (
diff --git a/src/components/MentionSuggestions.tsx b/src/components/MentionSuggestions.tsx
index 142813355118..524029fbc536 100644
--- a/src/components/MentionSuggestions.tsx
+++ b/src/components/MentionSuggestions.tsx
@@ -88,7 +88,7 @@ function MentionSuggestions({
return (
- {item.icons && !!item.icons.length && (
+ {!!item.icons && !!item.icons.length && (
)}
- {icon && !Array.isArray(icon) && (
+ {!!icon && !Array.isArray(icon) && (
))}
- {icon && iconType === CONST.ICON_TYPE_WORKSPACE && (
+ {!!icon && iconType === CONST.ICON_TYPE_WORKSPACE && (
)}
- {secondaryIcon && (
+ {!!secondaryIcon && (
)}
- {shouldShowTitleIcon && titleIcon && (
+ {!!shouldShowTitleIcon && !!titleIcon && (
- {badgeText && (
+ {!!badgeText && (
)}
{/* Since subtitle can be of type number, we should allow 0 to be shown */}
- {(subtitle === 0 || subtitle) && (
+ {(subtitle === 0 || !!subtitle) && (
{subtitle}
)}
- {floatRightAvatars?.length > 0 && firstIcon && (
+ {floatRightAvatars?.length > 0 && !!firstIcon && (
{shouldShowSubscriptRightAvatar ? (
)}
- {shouldShowExportIntegrationButton && !shouldUseNarrowLayout && (
+ {!!shouldShowExportIntegrationButton && !shouldUseNarrowLayout && (
)}
- {isMoreContentShown && (
+ {!!isMoreContentShown && (
{isDuplicate && shouldUseNarrowLayout && (
@@ -443,7 +443,7 @@ function MoneyReportHeader({policy, report: moneyRequestReport, transactionThrea
isLoading={!isOffline && !canAllowSettlement}
/>
)}
- {shouldShowExportIntegrationButton && shouldUseNarrowLayout && (
+ {!!shouldShowExportIntegrationButton && shouldUseNarrowLayout && (
{shouldShowNextStep && }
- {statusBarProps && (
+ {!!statusBarProps && (
(
{translate('iou.participants')}
- {!shouldShowReadOnlySplits && isSplitModified && (
+ {!shouldShowReadOnlySplits && !!isSplitModified && (
{
IOU.resetSplitShares(transaction);
diff --git a/src/components/MoneyRequestHeader.tsx b/src/components/MoneyRequestHeader.tsx
index 377062d432ad..2dde3e9e2aa9 100644
--- a/src/components/MoneyRequestHeader.tsx
+++ b/src/components/MoneyRequestHeader.tsx
@@ -204,7 +204,7 @@ function MoneyRequestHeader({report, parentReportAction, policy, onBackButtonPre
/>
)}
- {statusBarProps && (
+ {!!statusBarProps && (
{title}
- {shouldShowActionButton && (
+ {!!shouldShowActionButton && (
(
hasError && styles.borderColorDanger,
]}
>
- {label && {label}}
+ {!!label && {label}}
(
<>
{!inline && labelText}
- {icon && (
+ {!!icon && (
)}
- {(hasReceipt || errors) && (
+ {(hasReceipt || !!errors) && (
)}
{!shouldShowReceiptEmptyState && !hasReceipt && }
- {shouldShowAuditMessage && }
+ {!!shouldShowAuditMessage && }
- {shouldShowCategory && (
+ {!!shouldShowCategory && (
)}
{shouldShowTag && tagList}
- {shouldShowCard && (
+ {!!shouldShowCard && (
)}
- {shouldShowExportIntegrationButton && !shouldShowSettlementButton && (
+ {!!shouldShowExportIntegrationButton && !shouldShowSettlementButton && (
- {isHoldMenuVisible && iouReport && requestType !== undefined && (
+ {isHoldMenuVisible && !!iouReport && requestType !== undefined && (
{formatAirportInfo(reservation.end)}
- {bottomDescription && {bottomDescription}}
+ {!!bottomDescription && {bottomDescription}}
);
}
@@ -105,7 +105,7 @@ function ReservationView({reservation}: ReservationViewProps) {
>
{reservation.type === CONST.RESERVATION_TYPE.CAR ? reservation.carInfo?.name : reservation.start.longName}
- {bottomDescription && {bottomDescription}}
+ {!!bottomDescription && {bottomDescription}}
);
};
diff --git a/src/components/Search/SearchPageHeader.tsx b/src/components/Search/SearchPageHeader.tsx
index 00e07b0406b9..5665909185c4 100644
--- a/src/components/Search/SearchPageHeader.tsx
+++ b/src/components/Search/SearchPageHeader.tsx
@@ -58,7 +58,7 @@ function HeaderWrapper({icon, children, text, value, isCannedQuery, onSubmit, se
>
{isCannedQuery ? (
- {icon && (
+ {!!icon && (
- {rightComponent && {rightComponent}}
+ {!!rightComponent && {rightComponent}}
({
{typeof children === 'function' ? children(hovered) : children}
- {!canSelectMultiple && item.isSelected && !rightHandSideComponent && (
+ {!canSelectMultiple && !!item.isSelected && !rightHandSideComponent && (
({
)}
- {(!item.isSelected || item.canShowSeveralIndicators) && !!item.brickRoadIndicator && shouldDisplayRBR && (
+ {(!item.isSelected || !!item.canShowSeveralIndicators) && !!item.brickRoadIndicator && shouldDisplayRBR && (
({
shouldSyncFocus={shouldSyncFocus}
>
<>
- {item.bankIcon && (
+ {!!item.bankIcon && (
({
)}
- {canSelectMultiple && !item.isDisabled && (
+ {!!canSelectMultiple && !item.isDisabled && (
({
)}
{!!item.rightElement && item.rightElement}
- {shouldShowCheckBox && (
+ {!!shouldShowCheckBox && (
- {canSelectMultiple && (
+ {!!canSelectMultiple && (
- {isSelected && (
+ {!!isSelected && (
- {shouldDisplayArrowIcon && (
+ {!!shouldDisplayArrowIcon && (
({
- {canSelectMultiple && (
+ {!!canSelectMultiple && (
onCheckboxPress?.(item)}
isChecked={item.isSelected}
diff --git a/src/components/SelectionList/Search/SearchQueryListItem.tsx b/src/components/SelectionList/Search/SearchQueryListItem.tsx
index 3c9cc4c0cd8b..f1636be0d88c 100644
--- a/src/components/SelectionList/Search/SearchQueryListItem.tsx
+++ b/src/components/SelectionList/Search/SearchQueryListItem.tsx
@@ -43,7 +43,7 @@ function SearchQueryListItem({item, isFocused, showTooltip, onSelectRow, onFocus
showTooltip={showTooltip}
>
<>
- {item.singleIcon && (
+ {!!item.singleIcon && (
- {item.alternateText && (
+ {!!item.alternateText && (
- {canSelectMultiple && shouldShowTransactionCheckbox && (
+ {canSelectMultiple && !!shouldShowTransactionCheckbox && (
- {item.isSelected && (
+ {!!item.isSelected && (
({
/>
- {canSelectMultiple && !item.isDisabled && (
+ {!!canSelectMultiple && !item.isDisabled && (
({
>
{(hovered) => (
<>
- {canSelectMultiple && (
+ {!!canSelectMultiple && (
({
style={[styles.cursorUnset, StyleUtils.getCheckboxPressableStyle(), item.isDisabledCheckbox && styles.cursorDisabled, styles.mr3, item.cursorStyle]}
>
- {item.isSelected && (
+ {!!item.isSelected && (
({
>
{(hovered?: boolean) => (
<>
- {canSelectMultiple && (
+ {!!canSelectMultiple && (
({
style={[styles.cursorUnset, StyleUtils.getCheckboxPressableStyle(), item.isDisabledCheckbox && styles.cursorDisabled, styles.mr3]}
>
- {item.isSelected && (
+ {!!item.isSelected && (
({
>
{formTitle}
- {formPOBoxDisclaimer && {formPOBoxDisclaimer}}
+ {!!formPOBoxDisclaimer && {formPOBoxDisclaimer}}
- {shouldShowHelpLinks && }
+ {!!shouldShowHelpLinks && }
);
diff --git a/src/components/SubStepForms/ConfirmationStep.tsx b/src/components/SubStepForms/ConfirmationStep.tsx
index 7fbec82c4bbe..c3832628a7ca 100644
--- a/src/components/SubStepForms/ConfirmationStep.tsx
+++ b/src/components/SubStepForms/ConfirmationStep.tsx
@@ -90,7 +90,7 @@ function ConfirmationStep({pageTitle, summaryItems, showOnfidoLinks, onfidoLinks
)}
- {error && error.length > 0 && (
+ {!!error && error.length > 0 && (
({
>
{formTitle}
- {formDisclaimer && {formDisclaimer}}
+ {!!formDisclaimer && {formDisclaimer}}
- {secondaryAvatar && (
+ {!!secondaryAvatar && (
)}
- {subscriptIcon && (
+ {!!subscriptIcon && (
- {icon && (
+ {!!icon && (
<>
) : null}
- {iconLeft && (
+ {!!iconLeft && (
- {isFocused && !isReadOnly && shouldShowClearButton && value && setValue('')} />}
- {inputProps.isLoading && (
+ {isFocused && !isReadOnly && shouldShowClearButton && !!value && setValue('')} />}
+ {!!inputProps.isLoading && (
)}
- {!inputProps.secureTextEntry && icon && (
+ {!inputProps.secureTextEntry && !!icon && (
)}
- {contentWidth && (
+ {!!contentWidth && (
{
diff --git a/src/components/TextInput/BaseTextInput/index.tsx b/src/components/TextInput/BaseTextInput/index.tsx
index 48b99486d6cc..e36ae60255fc 100644
--- a/src/components/TextInput/BaseTextInput/index.tsx
+++ b/src/components/TextInput/BaseTextInput/index.tsx
@@ -334,7 +334,7 @@ function BaseTextInput(
) : null}
- {iconLeft && (
+ {!!iconLeft && (
)}
{isFocused && !isReadOnly && shouldShowClearButton && !!value && setValue('')} />}
- {inputProps.isLoading && (
+ {!!inputProps.isLoading && (
)}
- {contentWidth && (
+ {!!contentWidth && (
{
diff --git a/src/components/ThumbnailImage.tsx b/src/components/ThumbnailImage.tsx
index 85f100981f85..793a5fbe634d 100644
--- a/src/components/ThumbnailImage.tsx
+++ b/src/components/ThumbnailImage.tsx
@@ -146,7 +146,7 @@ function ThumbnailImage({
return (
- {isDeleted && }
+ {!!isDeleted && }
{translate('validateCodeForm.magicCodeNotReceived')}
- {hasMagicCodeBeenSent && (
+ {!!hasMagicCodeBeenSent && (
- {thumbnailUrl && (
+ {!!thumbnailUrl && (
- {user?.isDebugModeEnabled && (
+ {!!user?.isDebugModeEnabled && (
- {chatTabBrickRoad && (
+ {!!chatTabBrickRoad && (
)}
diff --git a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/DebugTabView.tsx b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/DebugTabView.tsx
index 3e5803b797dc..5336954486e6 100644
--- a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/DebugTabView.tsx
+++ b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/DebugTabView.tsx
@@ -157,7 +157,7 @@ function DebugTabView({selectedTab = '', chatTabBrickRoad, activeWorkspaceID}: D
src={Expensicons.DotIndicator}
fill={indicator}
/>
- {message && {translate(message)}}
+ {!!message && {translate(message)}}
- {chatTabBrickRoad && (
+ {!!chatTabBrickRoad && (
)}
diff --git a/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.tsx b/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.tsx
index 6c153b1b159e..b6ecba936911 100644
--- a/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.tsx
+++ b/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.tsx
@@ -112,7 +112,7 @@ function ResponsiveStackNavigator(props: ResponsiveStackNavigatorProps) {
descriptors={descriptors}
navigation={navigation}
/>
- {searchRoute && {descriptors[searchRoute.key].render()}}
+ {!!searchRoute && {descriptors[searchRoute.key].render()}}
);
}
diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.native.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.native.tsx
index 9c2cc3187504..35076c8ca6b6 100644
--- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.native.tsx
+++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.native.tsx
@@ -86,7 +86,7 @@ function createPlatformStackNavigatorComponent
- {ExtraContent && (
+ {!!ExtraContent && (
// eslint-disable-next-line react/jsx-props-no-spreading
)}
diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx
index ab698ad08707..2e3c99a6cb0d 100644
--- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx
+++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx
@@ -86,7 +86,7 @@ function createPlatformStackNavigatorComponent
- {ExtraContent && (
+ {!!ExtraContent && (
// eslint-disable-next-line react/jsx-props-no-spreading
)}
diff --git a/src/pages/Debug/Report/DebugReportPage.tsx b/src/pages/Debug/Report/DebugReportPage.tsx
index fe26fed0c9c0..675ff28b3be3 100644
--- a/src/pages/Debug/Report/DebugReportPage.tsx
+++ b/src/pages/Debug/Report/DebugReportPage.tsx
@@ -148,8 +148,8 @@ function DebugReportPage({
{title}
{subtitle}
- {message && {message}}
- {action && (
+ {!!message && {message}}
+ {!!action && (
- {error && error.length > 0 && (
+ {!!error && error.length > 0 && (
Navigation.navigate(ROUTES.REPORT_SETTINGS_NOTIFICATION_PREFERENCES.getRoute(report.reportID, navigateBackTo))}
/>
)}
- {!isEmptyObject(report) && report.reportID && !isCurrentUser && (
+ {!isEmptyObject(report) && !!report.reportID && !isCurrentUser && (
)}
- {isConcierge && guideCalendarLink && (
+ {isConcierge && !!guideCalendarLink && (
)}
- {!!report?.reportID && isDebugModeEnabled && (
+ {!!report?.reportID && !!isDebugModeEnabled && (
)}
- {otherIntegrationsItems && (
+ {!!otherIntegrationsItems && (
- customField && (
+ !!customField && (
- customField && (
+ !!customField && (
{
updateRecord({
diff --git a/src/pages/workspace/accounting/netsuite/import/NetSuiteImportCustomFieldView.tsx b/src/pages/workspace/accounting/netsuite/import/NetSuiteImportCustomFieldView.tsx
index d4c831d6155e..cb6513e785c1 100644
--- a/src/pages/workspace/accounting/netsuite/import/NetSuiteImportCustomFieldView.tsx
+++ b/src/pages/workspace/accounting/netsuite/import/NetSuiteImportCustomFieldView.tsx
@@ -96,7 +96,7 @@ function NetSuiteImportCustomFieldView({
shouldBeBlocked={!customField}
onBackButtonPress={() => Navigation.goBack(ROUTES.POLICY_ACCOUNTING_NETSUITE_IMPORT_CUSTOM_FIELD_MAPPING.getRoute(policyID, importCustomField))}
>
- {customField && (
+ {!!customField && (
)}
- {!!paymentBankAccountID && isContinuousReconciliationOn && (
+ {!!paymentBankAccountID && !!isContinuousReconciliationOn && (
Policy.clearXeroErrorField(policyID, CONST.XERO_CONFIG.IMPORT_TRACKING_CATEGORIES)}
/>
- {xeroConfig?.importTrackingCategories && (
+ {!!xeroConfig?.importTrackingCategories && (
{menuItems.map((menuItem) => (
Policy.clearXeroErrorField(policyID, CONST.XERO_CONFIG.SYNC_REIMBURSED_REPORTS)}
/>
- {sync?.syncReimbursedReports && (
+ {!!sync?.syncReimbursedReports && (
<>
- {policy?.areRulesEnabled && (
+ {!!policy?.areRulesEnabled && (
<>
{translate('workspace.rules.categoryRules.title')}
@@ -250,7 +250,7 @@ function CategorySettingsPage({
- {policyCategory?.areCommentsRequired && (
+ {!!policyCategory?.areCommentsRequired && (
)}
- {canUseCategoryAndTagApprovers && (
+ {!!canUseCategoryAndTagApprovers && (
<>
)}
- {policy?.tax?.trackingEnabled && (
+ {!!policy?.tax?.trackingEnabled && (
- {canUseWorkspaceRules && !!currentPolicy && (sections.at(0)?.data?.length ?? 0) > 0 && (
+ {!!canUseWorkspaceRules && !!currentPolicy && (sections.at(0)?.data?.length ?? 0) > 0 && (
@@ -140,7 +140,7 @@ function WorkspaceCategoriesSettingsPage({policy, route}: WorkspaceCategoriesSet
}}
/>
)}
- {canUseWorkspaceRules && categoryID && groupID && (
+ {!!canUseWorkspaceRules && !!categoryID && !!groupID && (
- {exportMenuItem?.description && (
+ {!!exportMenuItem?.description && (
{translate('workspace.moreFeatures.companyCards.integrationExportTitleFirstPart', {integration: exportMenuItem.description})}{' '}
- {exportMenuItem && (
+ {!!exportMenuItem && (
Navigation.navigate(ROUTES.WORKSPACE_COMPANY_CARD_NAME.getRoute(policyID, cardID, bank))}
/>
- {exportMenuItem && (
+ {!!exportMenuItem && (
- {url && (
+ {!!url && (
- {defaultUnit && (
+ {!!defaultUnit && (
)}
- {policy?.areCategoriesEnabled && OptionsListUtils.hasEnabledOptions(policyCategories ?? {}) && (
+ {!!policy?.areCategoriesEnabled && OptionsListUtils.hasEnabledOptions(policyCategories ?? {}) && (
- {isLoading && (
+ {!!isLoading && (
{translate('workspace.expensifyCard.settlementAccountDescription')}
- {isUsedContinuousReconciliation && (
+ {!!isUsedContinuousReconciliation && (
{translate('workspace.expensifyCard.settlementAccountInfoPt1')}{' '}
Navigation.navigate(ROUTES.WORKSPACE_ACCOUNTING_RECONCILIATION_ACCOUNT_SETTINGS.getRoute(policyID, connectionParam))}>
diff --git a/src/pages/workspace/invoices/WorkspaceInvoicesPage.tsx b/src/pages/workspace/invoices/WorkspaceInvoicesPage.tsx
index 4f14950ec93d..0697ac0750cd 100644
--- a/src/pages/workspace/invoices/WorkspaceInvoicesPage.tsx
+++ b/src/pages/workspace/invoices/WorkspaceInvoicesPage.tsx
@@ -37,9 +37,9 @@ function WorkspaceInvoicesPage({route}: WorkspaceInvoicesPageProps) {
>
{(_hasVBA?: boolean, policyID?: string) => (
- {policyID && }
- {policyID && }
- {policyID && }
+ {!!policyID && }
+ {!!policyID && }
+ {!!policyID && }
)}
diff --git a/src/pages/workspace/members/WorkspaceOwnerChangeWrapperPage.tsx b/src/pages/workspace/members/WorkspaceOwnerChangeWrapperPage.tsx
index 325e1112ab4b..c6a37c668c1a 100644
--- a/src/pages/workspace/members/WorkspaceOwnerChangeWrapperPage.tsx
+++ b/src/pages/workspace/members/WorkspaceOwnerChangeWrapperPage.tsx
@@ -75,7 +75,7 @@ function WorkspaceOwnerChangeWrapperPage({route, policy}: WorkspaceOwnerChangeWr
}}
/>
- {policy?.isLoading && }
+ {!!policy?.isLoading && }
{shouldShowPaymentCardForm && }
{!policy?.isLoading && !shouldShowPaymentCardForm && (
- {policy?.areRulesEnabled && canUseCategoryAndTagApprovers && !isMultiLevelTags && (
+ {!!policy?.areRulesEnabled && !!canUseCategoryAndTagApprovers && !isMultiLevelTags && (
<>
{translate('workspace.tags.tagRules')}
diff --git a/src/pages/workspace/tags/WorkspaceTagsSettingsPage.tsx b/src/pages/workspace/tags/WorkspaceTagsSettingsPage.tsx
index 3fadba088648..eb9b89ee5679 100644
--- a/src/pages/workspace/tags/WorkspaceTagsSettingsPage.tsx
+++ b/src/pages/workspace/tags/WorkspaceTagsSettingsPage.tsx
@@ -106,7 +106,7 @@ function WorkspaceTagsSettingsPage({route}: WorkspaceTagsSettingsPageProps) {
/>
- {canUseWorkspaceRules && policy?.areRulesEnabled && (
+ {!!canUseWorkspaceRules && !!policy?.areRulesEnabled && (
{translate('workspace.tags.trackBillable')}
diff --git a/src/pages/workspace/taxes/WorkspaceEditTaxPage.tsx b/src/pages/workspace/taxes/WorkspaceEditTaxPage.tsx
index 0f50ed8fe0b8..f10e0fba84a2 100644
--- a/src/pages/workspace/taxes/WorkspaceEditTaxPage.tsx
+++ b/src/pages/workspace/taxes/WorkspaceEditTaxPage.tsx
@@ -158,7 +158,7 @@ function WorkspaceEditTaxPage({
}}
/>
- {shouldShowDeleteMenuItem && (
+ {!!shouldShowDeleteMenuItem && (
- {removeApprovalWorkflow && !approvalWorkflow.isDefault && (
+ {!!removeApprovalWorkflow && !approvalWorkflow.isDefault && (