diff --git a/src/pages/workspace/upgrade/UpgradeIntro.tsx b/src/pages/workspace/upgrade/UpgradeIntro.tsx index 0483586f282e..d45e27905c28 100644 --- a/src/pages/workspace/upgrade/UpgradeIntro.tsx +++ b/src/pages/workspace/upgrade/UpgradeIntro.tsx @@ -9,9 +9,12 @@ import * as Expensicon from '@components/Icon/Expensicons'; import * as Illustrations from '@components/Icon/Illustrations'; import Text from '@components/Text'; import TextLink from '@components/TextLink'; +import useEnvironment from '@hooks/useEnvironment'; import useLocalize from '@hooks/useLocalize'; import useResponsiveLayout from '@hooks/useResponsiveLayout'; +import useSubscriptionPlan from '@hooks/useSubscriptionPlan'; import useThemeStyles from '@hooks/useThemeStyles'; +import {openLink} from '@libs/actions/Link'; import Navigation from '@libs/Navigation/Navigation'; import CONST from '@src/CONST'; import ROUTES from '@src/ROUTES'; @@ -28,6 +31,8 @@ function UpgradeIntro({feature, onUpgrade, buttonDisabled, loading, isCategorizi const styles = useThemeStyles(); const {isExtraSmallScreenWidth} = useResponsiveLayout(); const {translate} = useLocalize(); + const {environmentURL} = useEnvironment(); + const subscriptionPlan = useSubscriptionPlan(); const isIllustration = feature.icon in Illustrations; const iconSrc = isIllustration ? Illustrations[feature.icon as keyof typeof Illustrations] : Expensicon[feature.icon as keyof typeof Expensicon]; @@ -81,7 +86,13 @@ function UpgradeIntro({feature, onUpgrade, buttonDisabled, loading, isCategorizi {translate('workspace.upgrade.note.upgradeWorkspace')}{' '} Navigation.navigate(ROUTES.SETTINGS_SUBSCRIPTION)} + onPress={() => { + if (!subscriptionPlan) { + openLink(CONST.PLAN_TYPES_AND_PRICING_HELP_URL, environmentURL); + return; + } + Navigation.navigate(ROUTES.SETTINGS_SUBSCRIPTION); + }} > {translate('workspace.upgrade.note.learnMore')} {' '}