From 7369b83ae7cf29ef419fc2cc98e5a5199a4fd76d Mon Sep 17 00:00:00 2001 From: Diana Catalina Olarte Date: Tue, 2 Jul 2024 08:59:43 +1000 Subject: [PATCH] fix: update FOOTER_LOGO definition --- src/components/Footer.jsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/Footer.jsx b/src/components/Footer.jsx index 1c7a6eb27..9542bd6c4 100644 --- a/src/components/Footer.jsx +++ b/src/components/Footer.jsx @@ -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'; @@ -22,8 +22,6 @@ const EVENT_NAMES = { FOOTER_LINK: 'edx.bi.footer.link', }; -const FOOTER_LOGOS = process.env.FOOTER_ADDITIONAL_LOGOS; - const FooterSocial = ({ intl }) => (
@@ -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;