|
|
@@ -11,7 +11,11 @@ import {
|
|
|
populateEditorRedesignSegmentation,
|
|
|
useEditorAnalytics,
|
|
|
} from '@/shared/hooks/use-editor-analytics'
|
|
|
-import { useIsNewEditorEnabled } from '@/features/ide-redesign/utils/new-editor-utils'
|
|
|
+import {
|
|
|
+ isNewUser,
|
|
|
+ useIsNewEditorEnabled,
|
|
|
+} from '@/features/ide-redesign/utils/new-editor-utils'
|
|
|
+import { getSplitTestVariant } from '@/utils/splitTestUtils'
|
|
|
|
|
|
export const ShortCompileTimeoutErrorState = () => {
|
|
|
const { t } = useTranslation()
|
|
|
@@ -41,6 +45,22 @@ export const ShortCompileTimeoutErrorState = () => {
|
|
|
})
|
|
|
}, [segmentation, sendEvent])
|
|
|
|
|
|
+ const extraSearchParams = useMemo(() => {
|
|
|
+ if (!isNewUser()) {
|
|
|
+ return undefined
|
|
|
+ }
|
|
|
+
|
|
|
+ const variant = getSplitTestVariant('editor-redesign-new-users')
|
|
|
+
|
|
|
+ if (!variant) {
|
|
|
+ return undefined
|
|
|
+ }
|
|
|
+
|
|
|
+ return {
|
|
|
+ itm_content: variant,
|
|
|
+ }
|
|
|
+ }, [])
|
|
|
+
|
|
|
return (
|
|
|
<ErrorState
|
|
|
title={t('your_compile_timed_out')}
|
|
|
@@ -100,6 +120,7 @@ export const ShortCompileTimeoutErrorState = () => {
|
|
|
source="compile-timeout"
|
|
|
buttonProps={{ variant: 'premium', size: 'sm' }}
|
|
|
segmentation={segmentation}
|
|
|
+ extraSearchParams={extraSearchParams}
|
|
|
>
|
|
|
{t('start_a_free_trial')}
|
|
|
</StartFreeTrialButton>
|