From 5e0b1ecf8149795a2e73c468028e636cc2f23541 Mon Sep 17 00:00:00 2001 From: Shahbaz Shabbir <32649010+shahbaz-shabbir05@users.noreply.github.com> Date: Thu, 12 Oct 2023 23:06:01 +0500 Subject: [PATCH] fix: get brand logo file path from env (#205) Co-authored-by: Brian Smith <112954497+brian-smith-tcril@users.noreply.github.com> --- src/config/index.js | 1 + src/containers/LearnerDashboardHeader/BrandLogo.jsx | 3 ++- .../__snapshots__/BrandLogo.test.jsx.snap | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/config/index.js b/src/config/index.js index 648c7bde..447b1979 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -16,6 +16,7 @@ const configuration = { SUPPORT_URL: process.env.SUPPORT_URL || null, ENABLE_NOTICES: process.env.ENABLE_NOTICES || null, CAREER_LINK_URL: process.env.CAREER_LINK_URL || null, + LOGO_URL: process.env.LOGO_URL, }; const features = {}; diff --git a/src/containers/LearnerDashboardHeader/BrandLogo.jsx b/src/containers/LearnerDashboardHeader/BrandLogo.jsx index 2ea2a45c..fcedb008 100644 --- a/src/containers/LearnerDashboardHeader/BrandLogo.jsx +++ b/src/containers/LearnerDashboardHeader/BrandLogo.jsx @@ -3,6 +3,7 @@ import React from 'react'; import { useIntl } from '@edx/frontend-platform/i18n'; import { reduxHooks } from 'hooks'; +import { configuration } from '../../config'; import messages from './messages'; @@ -14,7 +15,7 @@ export const BrandLogo = () => { {formatMessage(messages.logoAltText)} diff --git a/src/containers/LearnerDashboardHeader/__snapshots__/BrandLogo.test.jsx.snap b/src/containers/LearnerDashboardHeader/__snapshots__/BrandLogo.test.jsx.snap index 96ecd4ea..f069b0a0 100644 --- a/src/containers/LearnerDashboardHeader/__snapshots__/BrandLogo.test.jsx.snap +++ b/src/containers/LearnerDashboardHeader/__snapshots__/BrandLogo.test.jsx.snap @@ -8,7 +8,7 @@ exports[`BrandLogo dashboard defined 1`] = ` edX, Inc. Dashboard `; @@ -21,7 +21,7 @@ exports[`BrandLogo dashboard undefined 1`] = ` edX, Inc. Dashboard `;