Skip to content

Commit

Permalink
add secondary button to book travel demo on trips page
Browse files Browse the repository at this point in the history
  • Loading branch information
rushatgabhane committed May 30, 2024
1 parent 7998624 commit 9b5a837
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/pages/Travel/ManageTrips.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import {View} from 'react-native';
import {Linking, View} from 'react-native';
import type {FeatureListItem} from '@components/FeatureList';
import FeatureList from '@components/FeatureList';
import * as Illustrations from '@components/Icon/Illustrations';
Expand All @@ -10,6 +10,7 @@ import useThemeStyles from '@hooks/useThemeStyles';
import useWindowDimensions from '@hooks/useWindowDimensions';
import Navigation from '@libs/Navigation/Navigation';
import colors from '@styles/theme/colors';
import CONST from '@src/CONST';
import ROUTES from '@src/ROUTES';
import getTripIllustrationStyle from './getTripIllustrationStyle';

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

const navigateToBookTravelDemo = () => {
Linking.openURL(CONST.BOOK_TRAVEL_DEMO_URL);
};

return (
<ScrollView contentContainerStyle={styles.pt3}>
<View style={[styles.flex1, isSmallScreenWidth ? styles.workspaceSectionMobile : styles.workspaceSection]}>
Expand All @@ -42,6 +47,9 @@ function ManageTrips() {
onCtaPress={() => {
Navigation.navigate(ROUTES.TRAVEL_TCS);
}}
secondaryButtonText={translate('travel.bookDemo')}
secondaryButtonAccessibilityLabel={translate('travel.bookDemo')}
onSecondaryButtonPress={navigateToBookTravelDemo}
illustration={LottieAnimations.Plane}
illustrationStyle={illustrationStyle}
illustrationBackgroundColor={colors.blue600}
Expand Down

0 comments on commit 9b5a837

Please sign in to comment.