Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion src/components/AccountSwitcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ function AccountSwitcher({isScreenFocused}: AccountSwitcherProps) {
const error = getLatestError(errorFields?.connect?.[email]);
const personalDetails = getPersonalDetailByEmail(email);
return createBaseMenuItem(personalDetails, error, {
badgeText: translate('delegate.role', {role}),
badgeText: translate('delegate.role', role),
onSelected: () => {
if (isOffline) {
close(() => setShouldShowOfflineModal(true));
Expand Down
4 changes: 2 additions & 2 deletions src/components/AccountingConnectionConfirmationModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ function AccountingConnectionConfirmationModal({integrationToConnect, onCancel,

return (
<ConfirmModal
title={translate('workspace.accounting.connectTitle', {connectionName: integrationToConnect})}
title={translate('workspace.accounting.connectTitle', integrationToConnect)}
isVisible
onConfirm={onConfirm}
onCancel={onCancel}
prompt={translate('workspace.accounting.connectPrompt', {connectionName: integrationToConnect})}
prompt={translate('workspace.accounting.connectPrompt', integrationToConnect)}
confirmText={translate('workspace.accounting.setup')}
cancelText={translate('common.cancel')}
success
Expand Down
25 changes: 10 additions & 15 deletions src/components/MoneyReportHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@
const duplicateExpenseTransaction = useCallback(
(transactionList: OnyxTypes.Transaction[]) => {
if (!transactionList.length) {
return;

Check warning on line 779 in src/components/MoneyReportHeader.tsx

View workflow job for this annotation

GitHub Actions / ESLint check

The 'targetPolicyTags' conditional could make the dependencies of useCallback Hook (at line 818) change on every render. Move it inside the useCallback callback. Alternatively, wrap the initialization of 'targetPolicyTags' in its own useMemo() Hook

Check warning on line 779 in src/components/MoneyReportHeader.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

The 'targetPolicyTags' conditional could make the dependencies of useCallback Hook (at line 818) change on every render. Move it inside the useCallback callback. Alternatively, wrap the initialization of 'targetPolicyTags' in its own useMemo() Hook
}

const optimisticChatReportID = generateReportID();
Expand Down Expand Up @@ -1084,10 +1084,11 @@
},
},
[CONST.REPORT.EXPORT_OPTIONS.EXPORT_TO_INTEGRATION]: {
text: translate('workspace.common.exportIntegrationSelected', {
text: translate(
'workspace.common.exportIntegrationSelected',
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
connectionName: connectedIntegrationFallback!,
}),
connectedIntegrationFallback!,
),
icon: (() => {
return getIntegrationIcon(connectedIntegration ?? connectedIntegrationFallback, expensifyIcons);
})(),
Expand Down Expand Up @@ -1218,10 +1219,11 @@
[CONST.REPORT.PRIMARY_ACTIONS.EXPORT_TO_ACCOUNTING]: (
<Button
success
text={translate('workspace.common.exportIntegrationSelected', {
text={translate(
'workspace.common.exportIntegrationSelected',
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
connectionName: connectedIntegration!,
})}
connectedIntegration!,
)}
onPress={() => {
if (!connectedIntegration || !moneyRequestReport) {
return;
Expand Down Expand Up @@ -1360,11 +1362,7 @@
return getSecondaryExportReportActions(accountID, email ?? '', moneyRequestReport, bankAccountList, policy, exportTemplates);
}, [moneyRequestReport, accountID, email, policy, exportTemplates, bankAccountList]);

const connectedIntegrationName = connectedIntegration
? translate('workspace.accounting.connectionName', {
connectionName: connectedIntegration,
})
: '';
const connectedIntegrationName = connectedIntegration ? translate('workspace.accounting.connectionName', connectedIntegration) : '';
const unapproveWarningText = useMemo(
() => (
<Text>
Expand Down Expand Up @@ -1865,10 +1863,7 @@
}
showConfirmModal({
title: translate('workspace.exportAgainModal.title'),
prompt: translate('workspace.exportAgainModal.description', {
connectionName: connectedIntegration ?? connectedIntegrationFallback,
reportName: moneyRequestReport?.reportName ?? '',
}),
prompt: translate('workspace.exportAgainModal.description', moneyRequestReport?.reportName ?? '', connectedIntegration ?? connectedIntegrationFallback),
confirmText: translate('workspace.exportAgainModal.confirmText'),
cancelText: translate('workspace.exportAgainModal.cancelText'),
}).then((result) => {
Expand Down
4 changes: 2 additions & 2 deletions src/components/ReportActionItem/ExportWithDropdownMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function ExportWithDropdownMenu({
const options = [
{
value: CONST.REPORT.EXPORT_OPTIONS.EXPORT_TO_INTEGRATION,
text: translate('workspace.common.exportIntegrationSelected', {connectionName}),
text: translate('workspace.common.exportIntegrationSelected', connectionName),
...optionTemplate,
},
{
Expand Down Expand Up @@ -116,7 +116,7 @@ function ExportWithDropdownMenu({
if (isExported) {
showConfirmModal({
title: translate('workspace.exportAgainModal.title'),
prompt: translate('workspace.exportAgainModal.description', {connectionName, reportName: report?.reportName ?? ''}),
prompt: translate('workspace.exportAgainModal.description', report?.reportName ?? '', connectionName),
confirmText: translate('workspace.exportAgainModal.confirmText'),
cancelText: translate('workspace.exportAgainModal.cancelText'),
}).then(({action}) => {
Expand Down
Loading
Loading