Skip to content

Commit

Permalink
Show custom rules as multi-line
Browse files Browse the repository at this point in the history
  • Loading branch information
puneetlath committed Feb 7, 2025
1 parent b34e5f8 commit 48e8f14
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions src/pages/workspace/rules/CustomRulesSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import usePolicy from '@hooks/usePolicy';
import useThemeStyles from '@hooks/useThemeStyles';
import Navigation from '@libs/Navigation/Navigation';
import ROUTES from '@src/ROUTES';

Check failure on line 9 in src/pages/workspace/rules/CustomRulesSection.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Delete `';⏎import·OfflineWithFeedback·from·'@components/OfflineWithFeedback`

Check failure on line 9 in src/pages/workspace/rules/CustomRulesSection.tsx

View workflow job for this annotation

GitHub Actions / ESLint check

Delete `';⏎import·OfflineWithFeedback·from·'@components/OfflineWithFeedback`
import OfflineWithFeedback from '@components/OfflineWithFeedback';

type CustomRulesSectionProps = {
policyID: string;
Expand All @@ -26,19 +27,20 @@ function CustomRulesSection({policyID}: CustomRulesSectionProps) {
subtitleMuted
>
<View style={[styles.mt3]}>
{/* <OfflineWithFeedback
pendingAction={item.pendingAction}
key={translate(item.descriptionTranslationKey)}
> */}
<MenuItemWithTopDescription
shouldShowRightIcon
title={policy?.customRules ?? ''}
description={translate('workspace.rules.customRules.subtitle')}
onPress={() => Navigation.navigate(ROUTES.RULES_CUSTOM.getRoute(policyID))}
wrapperStyle={[styles.sectionMenuItemTopDescription]}
numberOfLinesTitle={2}
/>
{/* </OfflineWithFeedback> */}
<OfflineWithFeedback
pendingAction={policy?.pendingFields?.customRules}
errors={policy?.errors?.customRules}

Check failure on line 32 in src/pages/workspace/rules/CustomRulesSection.tsx

View workflow job for this annotation

GitHub Actions / typecheck

Type 'string | null | undefined' is not assignable to type 'Errors | ReceiptErrors | null | undefined'.
>
<MenuItemWithTopDescription
title={policy?.customRules ?? ''}
description={translate('workspace.rules.customRules.subtitle')}
shouldShowRightIcon
interactive
wrapperStyle={styles.sectionMenuItemTopDescription}
onPress={() => Navigation.navigate(ROUTES.RULES_CUSTOM.getRoute(policyID))}
shouldRenderAsHTML
/>
</OfflineWithFeedback>
</View>
</Section>
);
Expand Down

0 comments on commit 48e8f14

Please sign in to comment.