Skip to content

Commit

Permalink
Hide the More Features cta text on CategorySettingsPage
Browse files Browse the repository at this point in the history
  • Loading branch information
marcaaron committed Sep 26, 2024
1 parent cc2aca1 commit 246fa81
Showing 1 changed file with 23 additions and 21 deletions.
44 changes: 23 additions & 21 deletions src/pages/workspace/categories/CategorySettingsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -256,27 +256,29 @@ function CategorySettingsPage({
</OfflineWithFeedback>
)}
{canUseCategoryAndTagApprovers && (
<MenuItemWithTopDescription
title={approverText}
description={translate('workspace.rules.categoryRules.approver')}
onPress={() => {
Navigation.navigate(ROUTES.WORSKPACE_CATEGORY_APPROVER.getRoute(policyID, policyCategory.name));
}}
shouldShowRightIcon
disabled={approverDisabled}
/>
)}
{approverDisabled && (
<Text style={[styles.flexRow, styles.alignItemsCenter, styles.mv2, styles.mh5]}>
<Text style={[styles.textLabel, styles.colorMuted]}>{translate('workspace.rules.categoryRules.goTo')}</Text>{' '}
<TextLink
style={[styles.link, styles.label]}
onPress={() => Navigation.navigate(ROUTES.WORKSPACE_MORE_FEATURES.getRoute(policyID))}
>
{translate('workspace.common.moreFeatures')}
</TextLink>{' '}
<Text style={[styles.textLabel, styles.colorMuted]}>{translate('workspace.rules.categoryRules.andEnableWorkflows')}</Text>
</Text>
<>
<MenuItemWithTopDescription
title={approverText}
description={translate('workspace.rules.categoryRules.approver')}
onPress={() => {
Navigation.navigate(ROUTES.WORSKPACE_CATEGORY_APPROVER.getRoute(policyID, policyCategory.name));
}}
shouldShowRightIcon
disabled={approverDisabled}
/>
{approverDisabled && (
<Text style={[styles.flexRow, styles.alignItemsCenter, styles.mv2, styles.mh5]}>
<Text style={[styles.textLabel, styles.colorMuted]}>{translate('workspace.rules.categoryRules.goTo')}</Text>{' '}
<TextLink
style={[styles.link, styles.label]}
onPress={() => Navigation.navigate(ROUTES.WORKSPACE_MORE_FEATURES.getRoute(policyID))}
>
{translate('workspace.common.moreFeatures')}
</TextLink>{' '}
<Text style={[styles.textLabel, styles.colorMuted]}>{translate('workspace.rules.categoryRules.andEnableWorkflows')}</Text>
</Text>
)}
</>
)}
{policy?.tax?.trackingEnabled && (
<MenuItemWithTopDescription
Expand Down

0 comments on commit 246fa81

Please sign in to comment.