Skip to content

Commit

Permalink
fix: update FOOTER_LOGO definition
Browse files Browse the repository at this point in the history
  • Loading branch information
dcoa committed Jul 1, 2024
1 parent fe86e17 commit 7369b83
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ 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 { ensureConfig, getConfig } 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,8 +22,6 @@ const EVENT_NAMES = {
FOOTER_LINK: 'edx.bi.footer.link',
};

const FOOTER_LOGOS = process.env.FOOTER_ADDITIONAL_LOGOS;

const FooterSocial = ({ intl }) => (
<div className="footer-social d-flex mt-2">
<a className="footer-social__badge" href={social?.newsletter} target="_blank" rel="noopener noreferrer" title={intl.formatMessage(messages['footer.nau.social.newsletter'])}>
Expand All @@ -43,8 +41,12 @@ FooterSocial.propTypes = {
};

const AdditionalLogosSection = () => {
const FOOTER_LOGOS = getConfig().FOOTER_ADDITIONAL_LOGOS || process.env.FOOTER_ADDITIONAL_LOGOS;
const parseFooterLogos = () => {
try {
if (Array.isArray(FOOTER_LOGOS)) {
return FOOTER_LOGOS;
}
return JSON.parse(FOOTER_LOGOS);
} catch (e) {
return null;
Expand Down

0 comments on commit 7369b83

Please sign in to comment.