Skip to content

Commit

Permalink
Merge pull request #119 from Pearson-Advance/vue/PADV-1711
Browse files Browse the repository at this point in the history
feat: add banner in institution portal
  • Loading branch information
AuraAlba authored Oct 8, 2024
2 parents e4c3f89 + 1673abb commit 3f57df1
Show file tree
Hide file tree
Showing 3 changed files with 105 additions and 9 deletions.
106 changes: 98 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"react": "16.14.0",
"react-dom": "16.14.0",
"react-intl": "^5.25.1",
"react-paragon-topaz": "^1.8.0",
"react-paragon-topaz": "^1.15.0",
"react-redux": "^7.2.9",
"react-router": "5.2.1",
"react-router-dom": "5.3.0",
Expand Down
6 changes: 6 additions & 0 deletions src/features/Main/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {

import { getConfig } from '@edx/frontend-platform';
import { Container, Spinner } from '@edx/paragon';
import { Banner } from 'react-paragon-topaz';

import CookiePolicyBanner from '@pearsonedunext/frontend-component-cookie-policy-banner';

Expand Down Expand Up @@ -52,6 +53,8 @@ const Main = () => {
const statusInstitutions = useSelector((state) => state.main.institution.status);
const isLoadingInstitutions = statusInstitutions === RequestStatus.LOADING;

const bannerText = getConfig().MAINTENANCE_BANNER_TEXT || '';

useEffect(() => {
dispatch(fetchInstitutionData());
}, [dispatch]);
Expand Down Expand Up @@ -83,6 +86,9 @@ const Main = () => {
<BrowserRouter basename={getConfig().INSTITUTION_PORTAL_PATH}>
<CookiePolicyBanner policyText={{ en: cookieText }} />
<Header />
{bannerText && (
<Banner variant="warning" iconWarning text={bannerText} />
)}
<div className="pageWrapper">
<main className="d-flex">
{isLoadingInstitutions && (
Expand Down

0 comments on commit 3f57df1

Please sign in to comment.