Browse Source

feat(project-creation): Make product selection feature available to everyone - Part 3 (#50934)

Priscila Oliveira 1 year ago
parent
commit
df800b358f
2 changed files with 7 additions and 1 deletions
  1. 2 0
      static/app/types/hooks.tsx
  2. 5 1
      static/app/views/projectInstall/platform.tsx

+ 2 - 0
static/app/types/hooks.tsx

@@ -94,6 +94,7 @@ type ReplayGracePeriodAlertProps = {organization: Organization};
 type ReplayOnboardingAlertProps = {children: React.ReactNode};
 type ReplayFeedbackButton = {children: React.ReactNode};
 type ReplayOnboardingCTAProps = {children: React.ReactNode; organization: Organization};
+type ProductUnavailableCTAProps = {organization: Organization};
 
 type ProfilingBetaAlertBannerProps = {
   organization: Organization;
@@ -171,6 +172,7 @@ export type ComponentHooks = {
   'component:member-list-header': () => React.ComponentType<MemberListHeaderProps>;
   'component:org-stats-banner': () => React.ComponentType<DashboardHeadersProps>;
   'component:product-selection-availability': () => React.ComponentType<ProductSelectionAvailabilityProps>;
+  'component:product-unavailable-cta': () => React.ComponentType<ProductUnavailableCTAProps>;
   'component:profiling-am1-or-mmx-upgrade': () => React.ComponentType<ProfilingAM1OrMMXUpgrade>;
   'component:profiling-billing-banner': () => React.ComponentType<ProfilingBetaAlertBannerProps>;
   'component:profiling-upgrade-plan-button': () => React.ComponentType<ProfilingUpgradePlanButtonProps>;

+ 5 - 1
static/app/views/projectInstall/platform.tsx

@@ -45,6 +45,10 @@ const SetUpSdkDocHook = HookOrDefault({
   hookName: 'component:set-up-sdk-doc',
 });
 
+const ProductUnavailableCTAHook = HookOrDefault({
+  hookName: 'component:product-unavailable-cta',
+});
+
 type Props = RouteComponentProps<{projectId: string}, {}>;
 
 export function SetUpGeneralSdkDoc({
@@ -304,6 +308,7 @@ export function ProjectInstallPlatform({location, params, route, router}: Props)
 
   return (
     <Fragment>
+      <ProductUnavailableCTAHook organization={organization} />
       <StyledPageHeader>
         <h2>{t('Configure %(platform)s SDK', {platform: platform.name})}</h2>
         <ButtonBar gap={1}>
@@ -366,7 +371,6 @@ export function ProjectInstallPlatform({location, params, route, router}: Props)
             platform={platform}
           />
         )}
-
         {isGettingStarted && showPerformancePrompt && (
           <Feature
             features={['performance-view']}