File tree Expand file tree Collapse file tree 4 files changed +11
-8
lines changed
compass-indexes/src/components/create-index-modal Expand file tree Collapse file tree 4 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,10 @@ import {
2626} from '@mongodb-js/compass-telemetry/provider' ;
2727import { useConnectionInfoRef } from '@mongodb-js/compass-connections/provider' ;
2828import { usePreference } from 'compass-preferences-model/provider' ;
29- import { fireExperimentViewed , TestName } from '@mongodb-js/compass-utils' ;
29+ import {
30+ useFireExperimentViewed ,
31+ TestName ,
32+ } from '@mongodb-js/compass-telemetry' ;
3033
3134type CreateIndexModalProps = React . ComponentProps < typeof CreateIndexForm > & {
3235 isVisible : boolean ;
@@ -75,12 +78,12 @@ function CreateIndexModal({
7578 ) ;
7679
7780 // @experiment Early Journey Indexes Guidance & Awareness | Jira Epic: CLOUDP-239367
78- const enableInIndexesGuidanceExp = usePreference ( 'enableIndexesGuidanceExp' ) ;
79- const showIndexesGuidanceVariant = usePreference (
80- ' showIndexesGuidanceVariant'
81- ) ;
81+ const enableInIndexesGuidanceExp =
82+ usePreference ( 'enableIndexesGuidanceExp' ) || true ;
83+ const showIndexesGuidanceVariant =
84+ usePreference ( 'showIndexesGuidanceVariant' ) || true ;
8285
83- fireExperimentViewed ( {
86+ useFireExperimentViewed ( {
8487 testName : TestName . earlyJourneyIndexesGuidance ,
8588 shouldFire : enableInIndexesGuidanceExp || true ,
8689 } ) ;
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ export enum TestName {
77 earlyJourneyIndexesGuidance = 'EARLY_JOURNEY_INDEXES_GUIDANCE_20250328' ,
88}
99
10- export const fireExperimentViewed = ( {
10+ export const useFireExperimentViewed = ( {
1111 testName,
1212 shouldFire = true ,
1313} : {
Original file line number Diff line number Diff line change @@ -5,3 +5,4 @@ export type {
55 IdentifyTraits ,
66 ExtraConnectionData ,
77} from './types' ;
8+ export { TestName , useFireExperimentViewed } from './growth-experiments' ;
Original file line number Diff line number Diff line change 88 isCancelError ,
99 throwIfAborted ,
1010} from './cancellable-promise' ;
11- export { TestName , fireExperimentViewed } from './growth-experiments' ;
You can’t perform that action at this time.
0 commit comments