Skip to content
Merged
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
6 changes: 4 additions & 2 deletions src/pages/settings/Wallet/ExpensifyCardPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import ScrollView from '@components/ScrollView';
import Text from '@components/Text';
import {useCurrencyListActions} from '@hooks/useCurrencyList';
import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails';
import useEnvironment from '@hooks/useEnvironment';
import {useMemoizedLazyExpensifyIcons} from '@hooks/useLazyAsset';
import useLocalize from '@hooks/useLocalize';
import useNetwork from '@hooks/useNetwork';
Expand Down Expand Up @@ -88,6 +89,7 @@ function getLimitTypeTranslationKeys(limitType: ValueOf<typeof CONST.EXPENSIFY_C
}

function ExpensifyCardPage({route}: ExpensifyCardPageProps) {
const {isProduction} = useEnvironment();
const {cardID} = route.params;
const {convertToDisplayString} = useCurrencyListActions();
const [account] = useOnyx(ONYXKEYS.ACCOUNT);
Expand Down Expand Up @@ -530,7 +532,7 @@ function ExpensifyCardPage({route}: ExpensifyCardPageProps) {
</>
)}

{isWorkspaceAdmin && spendRulesSummary.length > 0 && (
{!isProduction && isWorkspaceAdmin && spendRulesSummary.length > 0 && (
<MenuItemWithTopDescription
description={translate('cardPage.spendRules')}
descriptionTextStyle={[styles.fontSizeLabel]}
Expand All @@ -552,7 +554,7 @@ function ExpensifyCardPage({route}: ExpensifyCardPageProps) {
);
}}
/>
{isWorkspaceAdmin && (
{!isProduction && isWorkspaceAdmin && (
<MenuItem
icon={expensifyIcons.CreditCardLock}
title={translate('cardPage.editSpendRules')}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import useCardFeeds from '@hooks/useCardFeeds';
import useCurrencyForExpensifyCard from '@hooks/useCurrencyForExpensifyCard';
import {useCurrencyListActions} from '@hooks/useCurrencyList';
import useDefaultFundID from '@hooks/useDefaultFundID';
import useEnvironment from '@hooks/useEnvironment';
import useExpensifyCardFeeds from '@hooks/useExpensifyCardFeeds';
import {useMemoizedLazyExpensifyIcons, useMemoizedLazyIllustrations} from '@hooks/useLazyAsset';
import useLocalize from '@hooks/useLocalize';
Expand Down Expand Up @@ -54,6 +55,7 @@ type WorkspaceExpensifyCardDetailsPageProps = PlatformStackScreenProps<
>;

function WorkspaceExpensifyCardDetailsPage({route}: WorkspaceExpensifyCardDetailsPageProps) {
const {isProduction} = useEnvironment();
const navigation = useNavigation<NavigationProp<SettingsNavigatorParamList>>();
const {policyID, cardID, backTo} = route.params;
const {convertToDisplayString} = useCurrencyListActions();
Expand Down Expand Up @@ -332,7 +334,7 @@ function WorkspaceExpensifyCardDetailsPage({route}: WorkspaceExpensifyCardDetail
}
/>
</OfflineWithFeedback>
{spendRulesSummary.length > 0 && (
{!isProduction && spendRulesSummary.length > 0 && (
<MenuItemWithTopDescription
description={translate('cardPage.spendRules')}
descriptionTextStyle={[styles.fontSizeLabel]}
Expand All @@ -357,7 +359,7 @@ function WorkspaceExpensifyCardDetailsPage({route}: WorkspaceExpensifyCardDetail
);
}}
/>
{isAdmin && (
{!isProduction && isAdmin && (
<MenuItem
icon={expensifyIcons.CreditCardLock}
title={translate('cardPage.editSpendRules')}
Expand Down
Loading