fullIntroduction.tsx 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import * as React from 'react';
  2. import {motion} from 'framer-motion';
  3. import {PlatformKey} from 'sentry/data/platformCategories';
  4. import platforms from 'sentry/data/platforms';
  5. import {t} from 'sentry/locale';
  6. import {Organization} from 'sentry/types';
  7. import isMobile from 'sentry/utils/isMobile';
  8. import SetupIntroduction from './setupIntroduction';
  9. type Props = {
  10. currentPlatform: PlatformKey;
  11. organization: Organization;
  12. };
  13. export default function FullIntroduction({currentPlatform, organization}: Props) {
  14. const showMobilePrompt =
  15. isMobile() &&
  16. organization.experiments.TargetedOnboardingMobileRedirectExperiment === 'email-cta';
  17. return (
  18. <React.Fragment>
  19. <SetupIntroduction
  20. stepHeaderText={t(
  21. 'Prepare the %s SDK',
  22. platforms.find(p => p.id === currentPlatform)?.name ?? ''
  23. )}
  24. platform={currentPlatform}
  25. />
  26. {showMobilePrompt && (
  27. <motion.p
  28. variants={{
  29. initial: {opacity: 0},
  30. animate: {opacity: 1},
  31. exit: {opacity: 0},
  32. }}
  33. >
  34. {t(
  35. 'When you are ready, click Setup on Computer, and we will email you the installation instructions.'
  36. )}
  37. </motion.p>
  38. )}
  39. </React.Fragment>
  40. );
  41. }