Skip to content

Commit 488644f

Browse files
fix: remove rebrand experiment from authn (#1187)
Description: Remove rebrand experiment code from Authn VAN-1858
1 parent 56bab26 commit 488644f

File tree

3 files changed

+2
-40
lines changed

3 files changed

+2
-40
lines changed

src/base-container/data/constants.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/base-container/index.jsx

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useEffect, useState } from 'react';
1+
import React from 'react';
22

33
import { getConfig } from '@edx/frontend-platform';
44
import { breakpoints } from '@openedx/paragon';
@@ -11,28 +11,11 @@ import {
1111
ImageExtraSmallLayout, ImageLargeLayout, ImageMediumLayout, ImageSmallLayout,
1212
} from './components/image-layout';
1313
import { AuthLargeLayout, AuthMediumLayout, AuthSmallLayout } from './components/welcome-page-layout';
14-
import { DEFAULT_LAYOUT, IMAGE_LAYOUT } from './data/constants';
1514

1615
const BaseContainer = ({ children, showWelcomeBanner, fullName }) => {
17-
const [baseContainerVersion, setBaseContainerVersion] = useState(DEFAULT_LAYOUT);
1816
const enableImageLayout = getConfig().ENABLE_IMAGE_LAYOUT;
1917

20-
useEffect(() => {
21-
const initRebrandExperiment = () => {
22-
if (window.experiments?.rebrandExperiment) {
23-
setBaseContainerVersion(window.experiments?.rebrandExperiment?.variation);
24-
} else {
25-
window.experiments = window.experiments || {};
26-
window.experiments.rebrandExperiment = {};
27-
window.experiments.rebrandExperiment.handleLoaded = () => {
28-
setBaseContainerVersion(window.experiments?.rebrandExperiment?.variation);
29-
};
30-
}
31-
};
32-
initRebrandExperiment();
33-
}, []);
34-
35-
if (baseContainerVersion === IMAGE_LAYOUT || enableImageLayout) {
18+
if (enableImageLayout) {
3619
return (
3720
<div className="layout">
3821
<MediaQuery maxWidth={breakpoints.extraSmall.maxWidth - 1}>

src/base-container/tests/BaseContainer.test.jsx

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,6 @@ describe('Base component tests', () => {
2525
expect(container.querySelector('.large-screen-svg-primary')).toBeDefined();
2626
});
2727

28-
it('[experiment] should show image layout for treatment group', () => {
29-
window.experiments = {
30-
rebrandExperiment: {
31-
variation: 'image-layout',
32-
},
33-
};
34-
35-
const { container } = render(
36-
<IntlProvider locale="en">
37-
<BaseContainer />
38-
</IntlProvider>,
39-
LargeScreen,
40-
);
41-
42-
expect(container.querySelector('.banner__image')).toBeDefined();
43-
});
44-
4528
it('renders Image layout when ENABLE_IMAGE_LAYOUT configuration is enabled', () => {
4629
mergeConfig({
4730
ENABLE_IMAGE_LAYOUT: true,

0 commit comments

Comments
 (0)