From e07e554254425bb42837db04b78328fcf341b021 Mon Sep 17 00:00:00 2001 From: Nikki Wines Date: Tue, 12 Nov 2024 12:39:15 -0500 Subject: [PATCH] Merge pull request #52412 from Expensify/cmartins-disableActionButtons [CP Staging] Disable Search action button offline (cherry picked from commit 0ba31d2995e27b5f4384ee74f60b3e73647f50e8) (CP triggered by francoisl) --- src/components/SelectionList/Search/ActionCell.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/SelectionList/Search/ActionCell.tsx b/src/components/SelectionList/Search/ActionCell.tsx index 55e2cf6f849d..0a360a96e7c7 100644 --- a/src/components/SelectionList/Search/ActionCell.tsx +++ b/src/components/SelectionList/Search/ActionCell.tsx @@ -4,6 +4,7 @@ import Badge from '@components/Badge'; import Button from '@components/Button'; import * as Expensicons from '@components/Icon/Expensicons'; import useLocalize from '@hooks/useLocalize'; +import useNetwork from '@hooks/useNetwork'; import useStyleUtils from '@hooks/useStyleUtils'; import useTheme from '@hooks/useTheme'; import useThemeStyles from '@hooks/useThemeStyles'; @@ -45,6 +46,7 @@ function ActionCell({ const theme = useTheme(); const styles = useThemeStyles(); const StyleUtils = useStyleUtils(); + const {isOffline} = useNetwork(); const text = translate(actionTranslationsMap[action]); @@ -98,6 +100,7 @@ function ActionCell({ innerStyles={buttonInnerStyles} isLoading={isLoading} success + isDisabled={isOffline} /> ); }