Skip to content

Commit

Permalink
fix: display org logo when is enable
Browse files Browse the repository at this point in the history
  • Loading branch information
dcoa authored and igobranco committed Dec 11, 2024
1 parent 210c6c4 commit f8c1a09
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Responsive from 'react-responsive';
import { injectIntl, intlShape } from '@edx/frontend-platform/i18n';
import { AppContext } from '@edx/frontend-platform/react';
import {
APP_CONFIG_INITIALIZED,
APP_PUBSUB_INITIALIZED,
ensureConfig,
mergeConfig,
getConfig,
Expand All @@ -25,7 +25,7 @@ ensureConfig([
'ORDER_HISTORY_URL',
], 'Header component');

subscribe(APP_CONFIG_INITIALIZED, () => {
subscribe(APP_PUBSUB_INITIALIZED, () => {
mergeConfig({
AUTHN_MINIMAL_HEADER: !!process.env.AUTHN_MINIMAL_HEADER,
ENABLE_ORG_LOGO: !!process.env.ENABLE_ORG_LOGO,
Expand Down
6 changes: 3 additions & 3 deletions src/learning-header/LearningHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ const LearningHeader = ({
}) => {
const { authenticatedUser } = useContext(AppContext);
const [logoOrg, setLogoOrg] = useState(null);
const enableOrgLogo = getConfig().ENABLE_ORG_LOGO || false;
const enableOrgLogo = getConfig().ENABLE_ORG_LOGO;

useEffect(() => {
if (courseOrg) {
if (courseOrg && enableOrgLogo) {
getCourseLogoOrg().then((logoOrgUrl) => { setLogoOrg(logoOrgUrl); });
}
});
}, [courseOrg, enableOrgLogo]);

const headerLogo = (
<>
Expand Down

0 comments on commit f8c1a09

Please sign in to comment.