Skip to content

Commit 998d5db

Browse files
committed
Fix Learn more button - Company cards
1 parent 4de2675 commit 998d5db

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/pages/settings/Subscription/CardSection/BillingBanner/BillingBanner.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function BillingBanner({
6363
}: BillingBannerProps) {
6464
const styles = useThemeStyles();
6565
const theme = useTheme();
66-
const {shouldUseNarrowLayout} = useResponsiveLayout();
66+
const {shouldUseNarrowLayout, isInLandscapeMode} = useResponsiveLayout();
6767
const expensifyIcons = useMemoizedLazyExpensifyIcons(['DotIndicator']);
6868

6969
const rightIconComponent = useMemo(() => {
@@ -110,7 +110,7 @@ function BillingBanner({
110110
{typeof title === 'string' ? <Text style={[styles.textStrong, titleStyle]}>{title}</Text> : title}
111111
{!!subtitle && (typeof subtitle === 'string' ? <Text style={subtitleStyle}>{subtitle}</Text> : subtitle)}
112112
</View>
113-
{shouldUseNarrowLayout ? (
113+
{shouldUseNarrowLayout && !isInLandscapeMode ? (
114114
<>
115115
{rightIconComponent}
116116
{!!rightComponent && rightComponent}

src/pages/workspace/companyCards/WorkspaceCompanyCardExpensifyCardPromotionBanner.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function WorkspaceCompanyCardExpensifyCardPromotionBanner({policy}: WorkspaceCom
2222
const styles = useThemeStyles();
2323
const {translate} = useLocalize();
2424
const StyleUtils = useStyleUtils();
25-
const {shouldUseNarrowLayout} = useResponsiveLayout();
25+
const {shouldUseNarrowLayout, isInLandscapeMode} = useResponsiveLayout();
2626
const policyID = policy?.id;
2727
const areExpensifyCardsEnabled = policy?.areExpensifyCardsEnabled;
2828

@@ -42,19 +42,19 @@ function WorkspaceCompanyCardExpensifyCardPromotionBanner({policy}: WorkspaceCom
4242
}, [policyID, areExpensifyCardsEnabled]);
4343

4444
const rightComponent = useMemo(() => {
45-
const smallScreenStyle = shouldUseNarrowLayout ? [styles.flex0, styles.flexBasis100, styles.justifyContentCenter] : [];
45+
const smallScreenStyle = shouldUseNarrowLayout && !isInLandscapeMode ? [styles.flex0, styles.justifyContentCenter] : [];
4646
return (
4747
<View style={[styles.flexRow, styles.gap2, smallScreenStyle]}>
4848
<Button
4949
success
5050
onPress={handleLearnMore}
51-
style={shouldUseNarrowLayout && styles.flex1}
51+
style={shouldUseNarrowLayout && !isInLandscapeMode && styles.flex1}
5252
text={translate('workspace.moreFeatures.companyCards.expensifyCardBannerLearnMoreButton')}
5353
accessibilityLabel={`${translate('workspace.moreFeatures.companyCards.expensifyCardBannerLearnMoreButton')}, ${translate('workspace.moreFeatures.companyCards.expensifyCardBannerTitle')}`}
5454
/>
5555
</View>
5656
);
57-
}, [styles, shouldUseNarrowLayout, translate, handleLearnMore]);
57+
}, [styles, shouldUseNarrowLayout, isInLandscapeMode, translate, handleLearnMore]);
5858

5959
return (
6060
<View style={[styles.ph4, styles.mb4]}>

0 commit comments

Comments
 (0)