File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
dotcom-rendering/src/components Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { DecideLayout } from '../layouts/DecideLayout';
44import { buildAdTargeting } from '../lib/ad-targeting' ;
55import { ArticleDesign } from '../lib/articleFormat' ;
66import { rootStyles } from '../lib/rootStyles' ;
7+ import { useBetaAB } from '../lib/useAB' ;
78import { filterABTestSwitches } from '../model/enhance-switches' ;
89import type { NavType } from '../model/extract-nav' ;
910import type { Article } from '../types/article' ;
@@ -23,7 +24,6 @@ import { SendTargetingParams } from './SendTargetingParams.importable';
2324import { SetABTests } from './SetABTests.importable' ;
2425import { SetAdTargeting } from './SetAdTargeting.importable' ;
2526import { SkipTo } from './SkipTo' ;
26- import { SomeComponent } from './SomeComponent' ;
2727
2828interface BaseProps {
2929 article : Article ;
@@ -67,9 +67,21 @@ export const ArticlePage = (props: WebProps | AppProps) => {
6767 theme,
6868 } ;
6969
70+ const abTests = useBetaAB ( ) ;
71+
72+ const isInVariantGroup =
73+ abTests ?. isUserInTestGroup (
74+ 'commercial-testing-beta-ab-test' ,
75+ 'variant' ,
76+ ) ?? false ;
77+
7078 return (
7179 < StrictMode >
72- < SomeComponent />
80+ { isInVariantGroup ? (
81+ < h1 > This is an AB test</ h1 >
82+ ) : (
83+ < h1 > Not in test</ h1 >
84+ ) }
7385 < Global styles = { rootStyles ( format , darkModeAvailable ) } />
7486 { isWeb && (
7587 < >
You can’t perform that action at this time.
0 commit comments