From 25bb7e53005d35c3ed04175338c2f7fdcce19b7b Mon Sep 17 00:00:00 2001 From: Nathalie Kuoch Date: Thu, 28 Mar 2024 09:41:14 +0100 Subject: [PATCH] Fix lint and use disabled --- src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx b/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx index ee47750663bc..466343ffa477 100644 --- a/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx +++ b/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx @@ -189,10 +189,8 @@ function WorkspaceWorkflowsPage({policy, betas, route, session}: WorkspaceWorkfl : translate('workflowsPage.connectBankAccount') } description={bankDisplayName} + disabled={isOffline || !isPolicyAdmin} onPress={() => { - if (isOffline || !isPolicyAdmin) { - return; - } if (!Policy.isCurrencySupportedForDirectReimbursement(policy?.outputCurrency ?? '')) { setIsCurrencyModalOpen(true); return; @@ -244,6 +242,8 @@ function WorkspaceWorkflowsPage({policy, betas, route, session}: WorkspaceWorkfl canUseDelayedSubmission, displayNameForAuthorizedPayer, session?.accountID, + isOffline, + isPolicyAdmin, ]); const renderOptionItem = (item: ToggleSettingOptionRowProps, index: number) => (