Skip to content

Commit

Permalink
Merge pull request #52412 from Expensify/cmartins-disableActionButtons
Browse files Browse the repository at this point in the history
[CP Staging] Disable Search action button offline

(cherry picked from commit 0ba31d2)

(CP triggered by francoisl)
  • Loading branch information
NikkiWines authored and OSBotify committed Nov 12, 2024
1 parent dccd27a commit e07e554
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/SelectionList/Search/ActionCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -45,6 +46,7 @@ function ActionCell({
const theme = useTheme();
const styles = useThemeStyles();
const StyleUtils = useStyleUtils();
const {isOffline} = useNetwork();

const text = translate(actionTranslationsMap[action]);

Expand Down Expand Up @@ -98,6 +100,7 @@ function ActionCell({
innerStyles={buttonInnerStyles}
isLoading={isLoading}
success
isDisabled={isOffline}
/>
);
}
Expand Down

0 comments on commit e07e554

Please sign in to comment.