Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
b669cca
Merge branch 'byoc-bulk-card-assign-r1' into byoc-bulk-card-assign-r1…
chrispader Dec 18, 2025
19f1a4d
Merge branch 'byoc-bulk-card-assign-r1-generic-table-component' into …
chrispader Dec 18, 2025
210e44a
Merge branch 'byoc-bulk-card-assign-r1-generic-table-component' into …
chrispader Dec 18, 2025
00b8267
feat: refactor `OfflineWithFeedback` and error dismissal
chrispader Dec 18, 2025
86f4771
fix: `OfflineWithFeedback` and `MessagesRow` spacing
chrispader Dec 18, 2025
78fea39
fix: update error states in `WorkspaceCompanyCardsTableItem`
chrispader Dec 18, 2025
f704d76
feat: implement pending state for failed assigned cards
chrispader Dec 18, 2025
7d45328
fix: make messages row smaller
chrispader Dec 18, 2025
c4b3bb5
fix: invalid usage of cardsList
chrispader Dec 18, 2025
6629ae8
Update Card.ts
chrispader Dec 18, 2025
8835385
Update WorkspaceCompanyCardsPage.tsx
chrispader Dec 18, 2025
6521e08
Merge branch 'byoc-bulk-card-assign-r1' into byoc-bulk-card-assign-r1…
chrispader Dec 18, 2025
908240f
remove unused props
chrispader Dec 18, 2025
68fa54f
rename `customCardName`
chrispader Dec 18, 2025
490242c
fix: remove success and error styles
chrispader Dec 18, 2025
72617a2
fix: remove manual memo
chrispader Dec 18, 2025
d0eae5d
Merge branch 'byoc-bulk-card-assign-r1' into byoc-bulk-card-assign-r1…
chrispader Dec 18, 2025
975c7ea
Merge branch 'byoc-bulk-card-assign-r1' into byoc-bulk-card-assign-r1…
chrispader Dec 18, 2025
bb4e6eb
Merge branch 'byoc-bulk-card-assign-r1' into byoc-bulk-card-assign-r1…
chrispader Dec 19, 2025
f8522c7
remove unused prop
chrispader Dec 19, 2025
a5ae1c2
fix: assignment RHP not closing
chrispader Dec 19, 2025
3702909
fix: failed card data not saved for Plaid
chrispader Dec 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/ONYXKEYS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,9 @@ const ONYXKEYS = {
*/
WORKSPACE_CARDS_LIST: 'cards_',

/** Collection of objects where each object represents the card assignment that failed */
FAILED_COMPANY_CARDS_ASSIGNMENTS: 'failedCompanyCardsAssignments_',

/** Expensify cards settings */
PRIVATE_EXPENSIFY_CARD_SETTINGS: 'private_expensifyCardSettings_',

Expand Down Expand Up @@ -1131,6 +1134,7 @@ type OnyxCollectionValuesMapping = {
[ONYXKEYS.COLLECTION.EXPENSIFY_CARD_BANK_ACCOUNT_METADATA]: OnyxTypes.ExpensifyCardBankAccountMetadata;
[ONYXKEYS.COLLECTION.PRIVATE_EXPENSIFY_CARD_MANUAL_BILLING]: boolean;
[ONYXKEYS.COLLECTION.WORKSPACE_CARDS_LIST]: OnyxTypes.WorkspaceCardsList;
[ONYXKEYS.COLLECTION.FAILED_COMPANY_CARDS_ASSIGNMENTS]: OnyxTypes.FailedCompanyCardAssignments;
[ONYXKEYS.COLLECTION.EXPENSIFY_CARD_CONTINUOUS_RECONCILIATION_CONNECTION]: OnyxTypes.PolicyConnectionName;
[ONYXKEYS.COLLECTION.EXPENSIFY_CARD_USE_CONTINUOUS_RECONCILIATION]: OnyxTypes.CardContinuousReconciliation;
[ONYXKEYS.COLLECTION.LAST_SELECTED_FEED]: OnyxTypes.CompanyCardFeedWithDomainID;
Expand Down
12 changes: 4 additions & 8 deletions src/components/ErrorMessageRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,14 @@ type ErrorMessageRowProps = {
/** Additional style object for the error row text */
errorRowTextStyles?: StyleProp<TextStyle>;

/** A function to run when the X button next to the error is clicked */
onClose?: () => void;

/** Whether we can dismiss the error message */
canDismissError?: boolean;
/** If passed, an X button next to the error will be shown and which triggers this callback */
onDismiss?: () => void;

/** A function to dismiss error */
dismissError?: () => void;
};

function ErrorMessageRow({errors, errorRowStyles, onClose, canDismissError = true, dismissError, errorRowTextStyles}: ErrorMessageRowProps) {
function ErrorMessageRow({errors, errorRowStyles, onDismiss, dismissError, errorRowTextStyles}: ErrorMessageRowProps) {
// Some errors have a null message. This is used to apply opacity only and to avoid showing redundant messages.
const errorEntries = Object.entries(errors ?? {});
const filteredErrorEntries = errorEntries.filter((errorEntry): errorEntry is [string, string | ReceiptError | OnyxCommon.TranslationKeyError] => errorEntry[1] !== null);
Expand All @@ -37,10 +34,9 @@ function ErrorMessageRow({errors, errorRowStyles, onClose, canDismissError = tru
<MessagesRow
messages={errorMessages}
type="error"
onClose={onClose}
onDismiss={onDismiss}
containerStyles={errorRowStyles}
errorTextStyles={errorRowTextStyles}
canDismiss={canDismissError}
dismissError={dismissError}
/>
) : null;
Expand Down
1 change: 0 additions & 1 deletion src/components/ImportSpreadsheetColumns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ function ImportSpreadsheetColumns({
shouldDisplayErrorAbove
errors={errors}
errorRowStyles={styles.mv2}
canDismissError={false}
>
<Button
text={translate('common.import')}
Expand Down
22 changes: 11 additions & 11 deletions src/components/MessagesRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import {isEmptyObject} from '@src/types/utils/EmptyObject';
import DotIndicatorMessage from './DotIndicatorMessage';
import Icon from './Icon';
import * as Expensicons from './Icon/Expensicons';

Check warning on line 13 in src/components/MessagesRow.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

'./Icon/Expensicons' import is restricted from being used by a pattern. Direct imports from Icon/Expensicons are deprecated. Please use lazy loading hooks instead. Use `useMemoizedLazyExpensifyIcons` from @hooks/useLazyAsset. See docs/LAZY_ICONS_AND_ILLUSTRATIONS.md for details
import PressableWithoutFeedback from './Pressable/PressableWithoutFeedback';
import Tooltip from './Tooltip';

Expand All @@ -22,46 +22,46 @@
type: 'error' | 'success';

/** A function to run when the X button next to the message is clicked */
onClose?: () => void;
onDismiss?: () => void;

/** Additional style object for the container */
containerStyles?: StyleProp<ViewStyle>;

/** Additional style object for the error text */
errorTextStyles?: StyleProp<TextStyle>;

/** Whether we can dismiss the messages */
canDismiss?: boolean;

/** A function to dismiss error */
dismissError?: () => void;
};

function MessagesRow({messages = {}, type, onClose = () => {}, containerStyles, canDismiss = true, dismissError = () => {}, errorTextStyles}: MessagesRowProps) {
function MessagesRow({messages = {}, type, onDismiss = () => {}, containerStyles, dismissError = () => {}, errorTextStyles}: MessagesRowProps) {
const theme = useTheme();
const styles = useThemeStyles();
const {translate} = useLocalize();

const showDismissButton = !!onDismiss;

const dismissText = translate('common.dismiss');

if (isEmptyObject(messages)) {
return null;
}

return (
<View style={[styles.flexRow, styles.alignItemsCenter, containerStyles]}>
<View style={[styles.flexRow, styles.alignItemsCenter, styles.mb4, styles.messagesRowHeight, containerStyles]}>
<DotIndicatorMessage
dismissError={dismissError}
style={styles.flex1}
textStyles={errorTextStyles}
messages={messages}
type={type}
/>
{canDismiss && (
<Tooltip text={translate('common.close')}>
{showDismissButton && (
<Tooltip text={dismissText}>
<PressableWithoutFeedback
onPress={onClose}
style={[styles.touchableButtonImage]}
onPress={onDismiss}
role={CONST.ROLE.BUTTON}
accessibilityLabel={translate('common.close')}
accessibilityLabel={dismissText}
>
<Icon
fill={theme.icon}
Expand Down
74 changes: 33 additions & 41 deletions src/components/OfflineWithFeedback.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {useCallback} from 'react';
import React from 'react';
import type {StyleProp, TextStyle, ViewStyle} from 'react-native';
import {View} from 'react-native';
import useNetwork from '@hooks/useNetwork';
Expand All @@ -22,7 +22,7 @@ import ImageSVG from './ImageSVG';
* care of adding the appropriate styles for pending actions and displaying the dismissible error.
*/

type OfflineWithFeedbackProps = ChildrenProps & {
type OfflineWithFeedbackProps = Partial<ChildrenProps> & {
/** The type of action that's pending */
pendingAction?: OnyxCommon.PendingAction | null;

Expand All @@ -41,10 +41,10 @@ type OfflineWithFeedbackProps = ChildrenProps & {
/** A function to run when the X button next to the error is clicked */
onClose?: () => void;

/** Additional styles to add after local styles. Applied to the parent container */
/** Additional styles to add to the container after local styles. Applied to the parent container */
style?: StyleProp<ViewStyle>;

/** Additional styles to add after local styles. Applied to the children wrapper container */
/** Additional styles to add to the children wrapper container after local styles. Applied to the children wrapper container */
contentContainerStyle?: StyleProp<ViewStyle>;

/** Additional style object for the error row */
Expand All @@ -59,9 +59,6 @@ type OfflineWithFeedbackProps = ChildrenProps & {
/** Whether to apply needsOffscreenAlphaCompositing prop to the children */
needsOffscreenAlphaCompositing?: boolean;

/** Whether we can dismiss the error message */
canDismissError?: boolean;

/** Whether we should render the error message above the children */
shouldDisplayErrorAbove?: boolean;

Expand All @@ -76,12 +73,11 @@ type StrikethroughProps = Partial<ChildrenProps> & {style: AllStyles[]};

function OfflineWithFeedback({
pendingAction,
canDismissError = true,
contentContainerStyle,
errorRowStyles,
errors,
needsOffscreenAlphaCompositing = false,
onClose = () => {},
onClose: onDismiss,
shouldDisableOpacity = false,
shouldDisableStrikeThrough = false,
shouldHideOnDelete = true,
Expand All @@ -91,7 +87,7 @@ function OfflineWithFeedback({
shouldForceOpacity = false,
dismissError = () => {},
errorRowTextStyles,
...rest
...restProps
}: OfflineWithFeedbackProps) {
const styles = useThemeStyles();
const StyleUtils = useStyleUtils();
Expand All @@ -105,38 +101,36 @@ function OfflineWithFeedback({
const needsOpacity = (!shouldDisableOpacity && ((isOfflinePendingAction && !isUpdateOrDeleteError) || isAddError)) || shouldForceOpacity;
const needsStrikeThrough = !shouldDisableStrikeThrough && isOffline && pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE;
const hideChildren = shouldHideOnDelete && !isOffline && pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE && !hasErrors;
let children = rest.children;
let children = restProps.children;
const hasChildren = !!children;

/**
* This method applies the strikethrough to all the children passed recursively
*/
const applyStrikeThrough = useCallback(
(childrenProp: React.ReactNode): React.ReactNode => {
const strikeThroughChildren = mapChildrenFlat(childrenProp, (child) => {
if (!React.isValidElement(child) || child.type === ImageSVG) {
return child;
}

type ChildComponentProps = ChildrenProps & {style?: AllStyles};
const childProps = child.props as ChildComponentProps;
const props: StrikethroughProps = {
style: StyleUtils.combineStyles(childProps.style ?? [], styles.offlineFeedbackDeleted, styles.userSelectNone),
};

if (childProps.children) {
props.children = applyStrikeThrough(childProps.children);
}

return React.cloneElement(child, props);
});

return strikeThroughChildren;
},
[StyleUtils, styles],
);
const applyStrikeThrough = (childrenProp: React.ReactNode): React.ReactNode => {
const strikeThroughChildren = mapChildrenFlat(childrenProp, (child) => {
if (!React.isValidElement(child) || child.type === ImageSVG) {
return child;
}

type ChildComponentProps = ChildrenProps & {style?: AllStyles};
const childProps = child.props as ChildComponentProps;
const props: StrikethroughProps = {
style: StyleUtils.combineStyles(childProps.style ?? [], styles.offlineFeedbackDeleted, styles.userSelectNone),
};

if (childProps.children) {
props.children = applyStrikeThrough(childProps.children);
}

return React.cloneElement(child, props);
});

return strikeThroughChildren;
};

// Apply strikethrough to children if needed, but skip it if we are not going to render them
if (needsStrikeThrough && !hideChildren) {
if (hasChildren && needsStrikeThrough && !hideChildren) {
children = applyStrikeThrough(children);
}
return (
Expand All @@ -145,13 +139,12 @@ function OfflineWithFeedback({
<ErrorMessageRow
errors={errors}
errorRowStyles={errorRowStyles}
onClose={onClose}
canDismissError={canDismissError}
onDismiss={onDismiss}
errorRowTextStyles={errorRowTextStyles}
dismissError={dismissError}
/>
)}
{!hideChildren && (
{hasChildren && !hideChildren && (
<View
style={[needsOpacity ? styles.offlineFeedbackPending : styles.offlineFeedbackDefault, contentContainerStyle]}
needsOffscreenAlphaCompositing={shouldRenderOffscreen ? needsOpacity && needsOffscreenAlphaCompositing : undefined}
Expand All @@ -164,8 +157,7 @@ function OfflineWithFeedback({
errors={errors}
errorRowStyles={errorRowStyles}
errorRowTextStyles={errorRowTextStyles}
onClose={onClose}
canDismissError={canDismissError}
onDismiss={onDismiss}
dismissError={dismissError}
/>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/components/SelectionScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
const {translate} = useLocalize();
const styles = useThemeStyles();

const [policy] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY}${policyID}`);

Check failure on line 146 in src/components/SelectionScreen.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

useOnyx() calls require you to pass the "canBeMissing" param
const isConnectionEmpty = isEmpty(policy?.connections?.[connectionName]);

return (
Expand Down Expand Up @@ -191,7 +191,7 @@
<ErrorMessageRow
errors={errors}
errorRowStyles={errorRowStyles}
onClose={onClose}
onDismiss={onClose}
/>
</SelectionList>
</OfflineWithFeedback>
Expand Down
34 changes: 29 additions & 5 deletions src/libs/actions/CompanyCards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import * as PolicyUtils from '@libs/PolicyUtils';
import * as ReportUtils from '@libs/ReportUtils';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import type {Card, Policy} from '@src/types/onyx';
import type {Card, FailedCompanyCardAssignment, Policy} from '@src/types/onyx';
import type {AssignCard, AssignCardData} from '@src/types/onyx/AssignCard';
import type {
AddNewCardFeedData,
Expand Down Expand Up @@ -308,14 +308,24 @@ function deleteWorkspaceCompanyCardFeed(policyID: string, domainOrWorkspaceAccou
API.write(WRITE_COMMANDS.DELETE_COMPANY_CARD_FEED, parameters, {optimisticData, successData, failureData});
}

function assignWorkspaceCompanyCard(policy: OnyxEntry<Policy>, data?: Partial<AssignCardData>) {
function assignWorkspaceCompanyCard(policy: OnyxEntry<Policy>, domainOrWorkspaceAccountID: number, data?: Partial<AssignCardData>) {
if (!data || !policy?.id) {
return;
}
const {bankName = '', email = '', encryptedCardNumber = '', startDate = '', cardName = ''} = data;
const {bankName = '', email = '', encryptedCardNumber = '', startDate = '', cardName = '', cardholder} = data;
const assigneeDetails = PersonalDetailsUtils.getPersonalDetailByEmail(email);
const optimisticCardAssignedReportAction = ReportUtils.buildOptimisticCardAssignedReportAction(assigneeDetails?.accountID ?? CONST.DEFAULT_NUMBER_ID);

const failedCardAssignment: FailedCompanyCardAssignment = {
cardholder,
cardName,
cardNumber: encryptedCardNumber,
pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
errors: {
failed: 'Card assignment failed.',
},
};

const parameters: AssignCompanyCardParams = {
policyID: policy.id,
bankName,
Expand Down Expand Up @@ -351,7 +361,7 @@ function assignWorkspaceCompanyCard(policy: OnyxEntry<Policy>, data?: Partial<As
{
onyxMethod: Onyx.METHOD.MERGE,
key: ONYXKEYS.ASSIGN_CARD,
value: {isAssigned: true, isAssigning: false},
value: {isAssigning: false, isAssignmentFinished: true},
},
],
failureData: [
Expand All @@ -368,7 +378,14 @@ function assignWorkspaceCompanyCard(policy: OnyxEntry<Policy>, data?: Partial<As
{
onyxMethod: Onyx.METHOD.MERGE,
key: ONYXKEYS.ASSIGN_CARD,
value: {isAssigning: false},
value: {isAssigning: false, isAssignmentFinished: true},
},
{
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.FAILED_COMPANY_CARDS_ASSIGNMENTS}${domainOrWorkspaceAccountID}`,
value: {
[encryptedCardNumber]: failedCardAssignment,
},
},
],
};
Expand Down Expand Up @@ -449,6 +466,12 @@ function unassignWorkspaceCompanyCard(domainOrWorkspaceAccountID: number, bankNa
API.write(WRITE_COMMANDS.UNASSIGN_COMPANY_CARD, parameters, onyxData);
}

function resetFailedWorkspaceCompanyCardAssignment(domainOrWorkspaceAccountID: number, cardNumber: string) {
Onyx.merge(`${ONYXKEYS.COLLECTION.FAILED_COMPANY_CARDS_ASSIGNMENTS}${domainOrWorkspaceAccountID}`, {
[cardNumber]: null,
});
}

function updateWorkspaceCompanyCard(domainOrWorkspaceAccountID: number, cardID: string, bankName: CompanyCardFeed, lastScrapeResult?: number) {
const authToken = NetworkStore.getAuthToken();

Expand Down Expand Up @@ -937,6 +960,7 @@ export {
addNewCompanyCardsFeed,
assignWorkspaceCompanyCard,
unassignWorkspaceCompanyCard,
resetFailedWorkspaceCompanyCardAssignment,
updateWorkspaceCompanyCard,
updateCompanyCardName,
setCompanyCardExportAccount,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import type {ValueOf} from 'type-fest';
import HeaderWithBackButton from '@components/HeaderWithBackButton';
import Icon from '@components/Icon';
import {Bank, Connect, RotateLeft} from '@components/Icon/Expensicons';

Check warning on line 7 in src/pages/ReimbursementAccount/VerifiedBankAccountFlowEntryPoint.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

'@components/Icon/Expensicons' import is restricted from being used by a pattern. Direct imports from Icon/Expensicons are deprecated. Please use lazy loading hooks instead. Use `useMemoizedLazyExpensifyIcons` from @hooks/useLazyAsset. See docs/LAZY_ICONS_AND_ILLUSTRATIONS.md for details

Check warning on line 7 in src/pages/ReimbursementAccount/VerifiedBankAccountFlowEntryPoint.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

'@components/Icon/Expensicons' import is restricted from being used. Direct imports from @components/Icon/Expensicons are deprecated. Please use lazy loading hooks instead. Use `useMemoizedLazyExpensifyIcons` from @hooks/useLazyAsset. See docs/LAZY_ICONS_AND_ILLUSTRATIONS.md for details
import LottieAnimations from '@components/LottieAnimations';
import MenuItem from '@components/MenuItem';
import OfflineWithFeedback from '@components/OfflineWithFeedback';
Expand Down Expand Up @@ -239,8 +239,7 @@
}
errorRowStyles={styles.mt2}
shouldShowErrorMessages
canDismissError={!reimbursementAccount?.maxAttemptsReached}
onClose={resetReimbursementAccount}
onClose={reimbursementAccount?.maxAttemptsReached ? undefined : resetReimbursementAccount}
>
<MenuItem
title={translate('workspace.bankAccount.continueWithSetup')}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import ErrorMessageRow from '@components/ErrorMessageRow';
import FullscreenLoadingIndicator from '@components/FullscreenLoadingIndicator';
import HeaderWithBackButton from '@components/HeaderWithBackButton';
import {Star, Trashcan} from '@components/Icon/Expensicons';

Check warning on line 10 in src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

'@components/Icon/Expensicons' import is restricted from being used by a pattern. Direct imports from Icon/Expensicons are deprecated. Please use lazy loading hooks instead. Use `useMemoizedLazyExpensifyIcons` from @hooks/useLazyAsset. See docs/LAZY_ICONS_AND_ILLUSTRATIONS.md for details

Check warning on line 10 in src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

'@components/Icon/Expensicons' import is restricted from being used. Direct imports from @components/Icon/Expensicons are deprecated. Please use lazy loading hooks instead. Use `useMemoizedLazyExpensifyIcons` from @hooks/useLazyAsset. See docs/LAZY_ICONS_AND_ILLUSTRATIONS.md for details
import {LockedAccountContext} from '@components/LockedAccountModalProvider';
import MenuItem from '@components/MenuItem';
import OfflineWithFeedback from '@components/OfflineWithFeedback';
Expand Down Expand Up @@ -320,12 +320,12 @@
<ErrorMessageRow
errors={getLatestErrorField(loginData, 'addedLogin')}
errorRowStyles={[themeStyles.mh5, themeStyles.mv3]}
onClose={() => {
onDismiss={() => {
clearContactMethod(contactMethod);
clearUnvalidatedNewContactMethodAction();
Navigation.goBack(ROUTES.SETTINGS_CONTACT_METHODS.getRoute(backTo));
}}
canDismissError

Check failure on line 328 in src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.tsx

View workflow job for this annotation

GitHub Actions / typecheck

Type '{ errors: Errors; errorRowStyles: ({ marginHorizontal: number; } | { marginVertical: number; })[]; onDismiss: () => void; canDismissError: true; }' is not assignable to type 'IntrinsicAttributes & ErrorMessageRowProps'.
/>
)}
{isValidateCodeFormVisible && !!loginData && !loginData.validatedDate && (
Expand Down
3 changes: 1 addition & 2 deletions src/pages/settings/Wallet/PaymentMethodListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,10 @@ function PaymentMethodListItem({item, shouldShowDefaultBadge, threeDotsMenuItems

return (
<OfflineWithFeedback
onClose={() => dismissError(item)}
onClose={item.canDismissError ? () => dismissError(item) : undefined}
pendingAction={item.pendingAction}
errors={item.errors}
errorRowStyles={styles.ph6}
canDismissError={item.canDismissError}
shouldShowErrorMessages={false}
>
<MenuItem
Expand Down
2 changes: 1 addition & 1 deletion src/pages/workspace/WorkspaceMembersPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ function WorkspaceMembersPage({personalDetails, route, policy}: WorkspaceMembers
// eslint-disable-next-line @typescript-eslint/naming-convention
messages={{0: translate('workspace.people.addedWithPrimary')}}
containerStyles={[styles.pb5, styles.ph5]}
onClose={() => dismissAddedWithPrimaryLoginMessages(policyID)}
onDismiss={() => dismissAddedWithPrimaryLoginMessages(policyID)}
/>
)}
</View>
Expand Down
Loading
Loading