Skip to content

Commit

Permalink
fix: update FOOTER_LOGO defionition
Browse files Browse the repository at this point in the history
  • Loading branch information
dcoa committed Jul 1, 2024
1 parent fe86e17 commit dc764db
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/components/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import React from 'react';
import PropTypes from 'prop-types';
import { injectIntl, intlShape } from '@edx/frontend-platform/i18n';
import { sendTrackEvent } from '@edx/frontend-platform/analytics';
import { ensureConfig } from '@edx/frontend-platform';
import {
APP_CONFIG_INITIALIZED, ensureConfig, getConfig, mergeConfig, subscribe,
} from '@edx/frontend-platform';
import { AppContext } from '@edx/frontend-platform/react';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faFacebookF, faLinkedinIn } from '@fortawesome/free-brands-svg-icons';
Expand All @@ -22,7 +24,11 @@ const EVENT_NAMES = {
FOOTER_LINK: 'edx.bi.footer.link',
};

const FOOTER_LOGOS = process.env.FOOTER_ADDITIONAL_LOGOS;
subscribe(APP_CONFIG_INITIALIZED, () => {
mergeConfig({
FOOTER_ADDITIONAL_LOGOS: !!process.env.FOOTER_ADDITIONAL_LOGOS,
}, 'Footer additional config');
});

const FooterSocial = ({ intl }) => (
<div className="footer-social d-flex mt-2">
Expand All @@ -43,6 +49,8 @@ FooterSocial.propTypes = {
};

const AdditionalLogosSection = () => {
const FOOTER_LOGOS = getConfig().FOOTER_ADDITIONAL_LOGOS;

const parseFooterLogos = () => {
try {
return JSON.parse(FOOTER_LOGOS);
Expand Down

0 comments on commit dc764db

Please sign in to comment.