Compare commits

...

2 Commits

Author SHA1 Message Date
Zainab Amir
8dbf20b3d2 fix: add policy banner settings to config (#708) 2022-12-19 18:07:57 +00:00
Zainab Amir
4ae9ead191 feat: make policy banner configurable (#707) 2022-12-19 18:07:57 +00:00
3 changed files with 4 additions and 1 deletions

1
.env
View File

@@ -29,3 +29,4 @@ ZENDESK_KEY=''
ZENDESK_LOGO_URL='' ZENDESK_LOGO_URL=''
APP_ID='' APP_ID=''
MFE_CONFIG_API_URL='' MFE_CONFIG_API_URL=''
ENABLE_COOKIE_POLICY_BANNER=''

View File

@@ -1,6 +1,7 @@
import React from 'react'; import React from 'react';
import CookiePolicyBanner from '@edx/frontend-component-cookie-policy-banner'; import CookiePolicyBanner from '@edx/frontend-component-cookie-policy-banner';
import { getConfig } from '@edx/frontend-platform';
import { getAuthenticatedUser } from '@edx/frontend-platform/auth'; import { getAuthenticatedUser } from '@edx/frontend-platform/auth';
import { getLocale } from '@edx/frontend-platform/i18n'; import { getLocale } from '@edx/frontend-platform/i18n';
import { breakpoints } from '@edx/paragon'; import { breakpoints } from '@edx/paragon';
@@ -21,7 +22,7 @@ const BaseComponent = ({ children, showWelcomeBanner }) => {
return ( return (
<> <>
<CookiePolicyBanner languageCode={getLocale()} /> {getConfig().ENABLE_COOKIE_POLICY_BANNER ? <CookiePolicyBanner languageCode={getLocale()} /> : null}
<div className="col-md-12 extra-large-screen-top-stripe" /> <div className="col-md-12 extra-large-screen-top-stripe" />
<div className="layout"> <div className="layout">
<MediaQuery maxWidth={breakpoints.small.maxWidth - 1}> <MediaQuery maxWidth={breakpoints.small.maxWidth - 1}>

View File

@@ -44,6 +44,7 @@ initialize({
MARKETING_EMAILS_OPT_IN: process.env.MARKETING_EMAILS_OPT_IN || '', MARKETING_EMAILS_OPT_IN: process.env.MARKETING_EMAILS_OPT_IN || '',
ENABLE_COPPA_COMPLIANCE: process.env.ENABLE_COPPA_COMPLIANCE || '', ENABLE_COPPA_COMPLIANCE: process.env.ENABLE_COPPA_COMPLIANCE || '',
ENABLE_DYNAMIC_REGISTRATION_FIELDS: process.env.ENABLE_DYNAMIC_REGISTRATION_FIELDS || false, ENABLE_DYNAMIC_REGISTRATION_FIELDS: process.env.ENABLE_DYNAMIC_REGISTRATION_FIELDS || false,
ENABLE_COOKIE_POLICY_BANNER: process.env.ENABLE_COOKIE_POLICY_BANNER || false,
}); });
}, },
}, },