Skip to content

Commit

Permalink
feat: remove cta and hide notifications banner if no accounts url
Browse files Browse the repository at this point in the history
  • Loading branch information
asadali145 committed Aug 20, 2024
1 parent f433d33 commit 32e356a
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 100 deletions.
2 changes: 0 additions & 2 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { LearningHeader as Header } from '@edx/frontend-component-header';
import { selectors } from 'data/redux';

import DemoWarning from 'containers/DemoWarning';
import CTA from 'containers/CTA';
import NotificationsBanner from 'containers/NotificationsBanner';
import ListView from 'containers/ListView';

Expand All @@ -27,7 +26,6 @@ export const App = ({ courseMetadata, isEnabled }) => (
data-testid="header"
/>
{!isEnabled && <DemoWarning />}
<CTA />
<NotificationsBanner />
<main data-testid="main">
<ListView />
Expand Down
1 change: 0 additions & 1 deletion src/App.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ jest.mock('@edx/frontend-component-header', () => ({
jest.mock('@edx/frontend-component-footer', () => ({ FooterSlot: 'Footer' }));

jest.mock('containers/DemoWarning', () => 'DemoWarning');
jest.mock('containers/CTA', () => 'CTA');
jest.mock('containers/ListView', () => 'ListView');
jest.mock('components/Head', () => 'Head');

Expand Down
2 changes: 0 additions & 2 deletions src/__snapshots__/App.test.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ exports[`App router component snapshot: disabled (show demo warning) 1`] = `
data-testid="header"
/>
<DemoWarning />
<CTA />
<NotificationsBanner />
<main
data-testid="main"
Expand All @@ -33,7 +32,6 @@ exports[`App router component snapshot: enabled 1`] = `
courseTitle="course-title"
data-testid="header"
/>
<CTA />
<NotificationsBanner />
<main
data-testid="main"
Expand Down
11 changes: 0 additions & 11 deletions src/containers/CTA/CTA.test.jsx

This file was deleted.

31 changes: 0 additions & 31 deletions src/containers/CTA/__snapshots__/CTA.test.jsx.snap

This file was deleted.

29 changes: 0 additions & 29 deletions src/containers/CTA/index.jsx

This file was deleted.

23 changes: 0 additions & 23 deletions src/containers/CTA/messages.js

This file was deleted.

4 changes: 3 additions & 1 deletion src/containers/NotificationsBanner/index.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import _ from 'lodash';
import React from 'react';

import { getConfig } from '@edx/frontend-platform';
Expand All @@ -6,7 +7,8 @@ import { PageBanner, Hyperlink } from '@openedx/paragon';

import messages from './messages';

export const NotificationsBanner = () => (
// eslint-disable-next-line no-confusing-arrow
export const NotificationsBanner = () => _.isEmpty(getConfig().ACCOUNT_SETTINGS_URL) ? null : (
<PageBanner variant="accentB">
<span>
<FormattedMessage {...messages.infoMessage} />
Expand Down

0 comments on commit 32e356a

Please sign in to comment.