Skip to content

Commit

Permalink
fix: rename ENABLED_ORG_LOGO setting
Browse files Browse the repository at this point in the history
Rename the setting to be in the present tense, as
a way to make it clearer. The setting is now called
`ENABLE_ORG_LOGO`.
  • Loading branch information
sandroscosta committed Aug 20, 2024
1 parent a8789fe commit 9d8b7a9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ ensureConfig([
subscribe(APP_CONFIG_INITIALIZED, () => {
mergeConfig({
AUTHN_MINIMAL_HEADER: !!process.env.AUTHN_MINIMAL_HEADER,
ENABLED_ORG_LOGO: !!process.env.ENABLED_ORG_LOGO,
ENABLE_ORG_LOGO: !!process.env.ENABLE_ORG_LOGO,
}, 'Header additional config');
});

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 @@ -30,7 +30,7 @@ const LearningHeader = ({
}) => {
const { authenticatedUser } = useContext(AppContext);
const [logoOrg, setLogoOrg] = useState(null);
const enabledOrgLogo = getConfig().ENABLED_ORG_LOGO || false;
const enableOrgLogo = getConfig().ENABLE_ORG_LOGO || false;

useEffect(() => {
if (courseOrg) {
Expand All @@ -53,8 +53,8 @@ const LearningHeader = ({
<div className="container-xl py-2 d-flex align-items-center">
{headerLogo}
<div className="d-none d-md-block flex-grow-1 course-title-lockup">
<div className={`d-md-flex ${enabledOrgLogo && 'align-items-center justify-content-center'} w-100`}>
{enabledOrgLogo ? (
<div className={`d-md-flex ${enableOrgLogo && 'align-items-center justify-content-center'} w-100`}>
{enableOrgLogo ? (
(courseOrg && logoOrg)
&& <img src={logoOrg} alt={`${courseOrg} logo`} style={{ maxHeight: '45px' }} />
) : null}
Expand Down

0 comments on commit 9d8b7a9

Please sign in to comment.