Skip to content

Commit 8c20932

Browse files
authored
Merge pull request #42864 from rushatgabhane/travel-demo
[VIP][Travel] Add book travel demo button
2 parents 7dcfddf + d9656ca commit 8c20932

File tree

5 files changed

+33
-1
lines changed

5 files changed

+33
-1
lines changed

src/CONST.ts

+1
Original file line numberDiff line numberDiff line change
@@ -3296,6 +3296,7 @@ const CONST = {
32963296
},
32973297

32983298
CONCIERGE_TRAVEL_URL: 'https://community.expensify.com/discussion/7066/introducing-concierge-travel',
3299+
BOOK_TRAVEL_DEMO_URL: 'https://calendly.com/d/ck2z-xsh-q97/expensify-travel-demo-travel-page',
32993300
SCREEN_READER_STATES: {
33003301
ALL: 'all',
33013302
ACTIVE: 'active',

src/components/FeatureList.tsx

+21
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@ type FeatureListProps = {
3232
/** Action to call on cta button press */
3333
onCtaPress?: () => void;
3434

35+
/** Text of the secondary button button */
36+
secondaryButtonText?: string;
37+
38+
/** Accessibility label for the secondary button */
39+
secondaryButtonAccessibilityLabel?: string;
40+
41+
/** Action to call on secondary button press */
42+
onSecondaryButtonPress?: () => void;
43+
3544
/** A list of menuItems representing the feature list. */
3645
menuItems: FeatureListItem[];
3746

@@ -57,6 +66,9 @@ function FeatureList({
5766
ctaText = '',
5867
ctaAccessibilityLabel = '',
5968
onCtaPress,
69+
secondaryButtonText = '',
70+
secondaryButtonAccessibilityLabel = '',
71+
onSecondaryButtonPress,
6072
menuItems,
6173
illustration,
6274
illustrationStyle,
@@ -99,6 +111,15 @@ function FeatureList({
99111
</View>
100112
))}
101113
</View>
114+
{secondaryButtonText && (
115+
<Button
116+
text={secondaryButtonText}
117+
onPress={onSecondaryButtonPress}
118+
accessibilityLabel={secondaryButtonAccessibilityLabel}
119+
style={[styles.w100, styles.mb3]}
120+
large
121+
/>
122+
)}
102123
<Button
103124
text={ctaText}
104125
onPress={onCtaPress}

src/languages/en.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1868,6 +1868,7 @@ export default {
18681868
alerts: 'Get realtime updates and alerts',
18691869
},
18701870
bookTravel: 'Book travel',
1871+
bookDemo: 'Book demo',
18711872
termsAndConditions: {
18721873
header: 'Before we continue...',
18731874
title: 'Please read the Terms & Conditions for travel',

src/languages/es.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1892,6 +1892,7 @@ export default {
18921892
alerts: 'Obtén actualizaciones y alertas en tiempo real',
18931893
},
18941894
bookTravel: 'Reservar viajes',
1895+
bookDemo: 'Pedir demostración',
18951896
termsAndConditions: {
18961897
header: 'Antes de continuar...',
18971898
title: 'Por favor, lee los Términos y condiciones para reservar viajes',

src/pages/Travel/ManageTrips.tsx

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import {View} from 'react-native';
2+
import {Linking, View} from 'react-native';
33
import type {FeatureListItem} from '@components/FeatureList';
44
import FeatureList from '@components/FeatureList';
55
import * as Illustrations from '@components/Icon/Illustrations';
@@ -10,6 +10,7 @@ import useThemeStyles from '@hooks/useThemeStyles';
1010
import useWindowDimensions from '@hooks/useWindowDimensions';
1111
import Navigation from '@libs/Navigation/Navigation';
1212
import colors from '@styles/theme/colors';
13+
import CONST from '@src/CONST';
1314
import ROUTES from '@src/ROUTES';
1415
import getTripIllustrationStyle from './getTripIllustrationStyle';
1516

@@ -30,6 +31,10 @@ function ManageTrips() {
3031
const {translate} = useLocalize();
3132
const illustrationStyle = getTripIllustrationStyle();
3233

34+
const navigateToBookTravelDemo = () => {
35+
Linking.openURL(CONST.BOOK_TRAVEL_DEMO_URL);
36+
};
37+
3338
return (
3439
<ScrollView contentContainerStyle={styles.pt3}>
3540
<View style={[styles.flex1, isSmallScreenWidth ? styles.workspaceSectionMobile : styles.workspaceSection]}>
@@ -42,6 +47,9 @@ function ManageTrips() {
4247
onCtaPress={() => {
4348
Navigation.navigate(ROUTES.TRAVEL_TCS);
4449
}}
50+
secondaryButtonText={translate('travel.bookDemo')}
51+
secondaryButtonAccessibilityLabel={translate('travel.bookDemo')}
52+
onSecondaryButtonPress={navigateToBookTravelDemo}
4553
illustration={LottieAnimations.Plane}
4654
illustrationStyle={illustrationStyle}
4755
illustrationBackgroundColor={colors.blue600}

0 commit comments

Comments
 (0)