|
@@ -10,7 +10,6 @@ import Hook from 'sentry/components/hook';
|
|
|
import Link from 'sentry/components/links/link';
|
|
|
import LogoSentry from 'sentry/components/logoSentry';
|
|
|
import {OnboardingContext} from 'sentry/components/onboarding/onboardingContext';
|
|
|
-import {PRODUCT} from 'sentry/components/onboarding/productSelection';
|
|
|
import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle';
|
|
|
import {PlatformKey} from 'sentry/data/platformCategories';
|
|
|
import {IconArrow} from 'sentry/icons';
|
|
@@ -22,7 +21,6 @@ import handleXhrErrorResponse from 'sentry/utils/handleXhrErrorResponse';
|
|
|
import Redirect from 'sentry/utils/redirect';
|
|
|
import testableTransition from 'sentry/utils/testableTransition';
|
|
|
import useApi from 'sentry/utils/useApi';
|
|
|
-import {useExperiment} from 'sentry/utils/useExperiment';
|
|
|
import useOrganization from 'sentry/utils/useOrganization';
|
|
|
import {normalizeUrl} from 'sentry/utils/withDomainRequired';
|
|
|
import PageCorners from 'sentry/views/onboarding/components/pageCorners';
|
|
@@ -83,16 +81,6 @@ function Onboarding(props: Props) {
|
|
|
const onboardingContext = useContext(OnboardingContext);
|
|
|
const selectedPlatforms = clientState?.selectedPlatforms || [];
|
|
|
const selectedProjectSlug = selectedPlatforms[0];
|
|
|
- const {
|
|
|
- logExperiment: productSelectionLogExperiment,
|
|
|
- experimentAssignment: productSelectionAssignment,
|
|
|
- } = useExperiment('OnboardingProductSelectionExperiment', {
|
|
|
- logExperimentOnMount: false,
|
|
|
- });
|
|
|
-
|
|
|
- const docsWithProductSelection = !!organization.features?.includes(
|
|
|
- 'onboarding-docs-with-product-selection'
|
|
|
- );
|
|
|
|
|
|
const {
|
|
|
params: {step: stepId},
|
|
@@ -106,12 +94,6 @@ function Onboarding(props: Props) {
|
|
|
};
|
|
|
}, []);
|
|
|
|
|
|
- useEffect(() => {
|
|
|
- if (docsWithProductSelection) {
|
|
|
- productSelectionLogExperiment();
|
|
|
- }
|
|
|
- }, [productSelectionLogExperiment, docsWithProductSelection]);
|
|
|
-
|
|
|
const heartbeatFooter = !!organization?.features.includes(
|
|
|
'onboarding-heartbeat-footer'
|
|
|
);
|
|
@@ -174,30 +156,9 @@ function Onboarding(props: Props) {
|
|
|
cornerVariantControl.start('none');
|
|
|
}
|
|
|
|
|
|
- if (
|
|
|
- nextStep.id === 'setup-docs' &&
|
|
|
- platforms?.[0] === 'javascript-react' &&
|
|
|
- docsWithProductSelection
|
|
|
- ) {
|
|
|
- if (productSelectionAssignment === 'variant1') {
|
|
|
- props.router.push(
|
|
|
- normalizeUrl(
|
|
|
- `/onboarding/${organization.slug}/${nextStep.id}/?product=${PRODUCT.PERFORMANCE_MONITORING}&product=${PRODUCT.SESSION_REPLAY}`
|
|
|
- )
|
|
|
- );
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
props.router.push(normalizeUrl(`/onboarding/${organization.slug}/${nextStep.id}/`));
|
|
|
},
|
|
|
- [
|
|
|
- organization.slug,
|
|
|
- onboardingSteps,
|
|
|
- cornerVariantControl,
|
|
|
- props.router,
|
|
|
- productSelectionAssignment,
|
|
|
- docsWithProductSelection,
|
|
|
- ]
|
|
|
+ [organization.slug, onboardingSteps, cornerVariantControl, props.router]
|
|
|
);
|
|
|
|
|
|
const deleteProject = useCallback(
|