Skip to content

Commit

Permalink
fix: ENABLED_ORG_LOGO definition
Browse files Browse the repository at this point in the history
  • Loading branch information
dcoa committed Jul 1, 2024
1 parent 736a5c7 commit e1f358a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
1 change: 1 addition & 0 deletions src/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ ensureConfig([
subscribe(APP_CONFIG_INITIALIZED, () => {
mergeConfig({
AUTHN_MINIMAL_HEADER: !!process.env.AUTHN_MINIMAL_HEADER,
ENABLED_ORG_LOGO: !!process.env.ENABLED_ORG_LOGO,
}, 'Header additional config');
});

Expand Down
16 changes: 8 additions & 8 deletions src/__snapshots__/Header.test.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ exports[`<Header /> renders correctly for anonymous mobile 1`] = `
height="24px"
role="img"
style={
{
Object {
"height": "1.5rem",
"width": "1.5rem",
}
Expand Down Expand Up @@ -163,7 +163,7 @@ exports[`<Header /> renders correctly for anonymous mobile 1`] = `
<span
className="avatar overflow-hidden d-inline-flex rounded-circle null"
style={
{
Object {
"height": "1.5rem",
"width": "1.5rem",
}
Expand All @@ -175,7 +175,7 @@ exports[`<Header /> renders correctly for anonymous mobile 1`] = `
height="24px"
role="img"
style={
{
Object {
"height": "1.5rem",
"width": "1.5rem",
}
Expand Down Expand Up @@ -253,7 +253,7 @@ exports[`<Header /> renders correctly for authenticated desktop 1`] = `
<span
className="avatar overflow-hidden d-inline-flex rounded-circle mr-2"
style={
{
Object {
"height": "1.5em",
"width": "1.5em",
}
Expand All @@ -265,7 +265,7 @@ exports[`<Header /> renders correctly for authenticated desktop 1`] = `
height="24px"
role="img"
style={
{
Object {
"height": "1.5em",
"width": "1.5em",
}
Expand Down Expand Up @@ -339,7 +339,7 @@ exports[`<Header /> renders correctly for authenticated mobile 1`] = `
height="24px"
role="img"
style={
{
Object {
"height": "1.5rem",
"width": "1.5rem",
}
Expand Down Expand Up @@ -409,7 +409,7 @@ exports[`<Header /> renders correctly for authenticated mobile 1`] = `
<span
className="avatar overflow-hidden d-inline-flex rounded-circle null"
style={
{
Object {
"height": "1.5rem",
"width": "1.5rem",
}
Expand All @@ -421,7 +421,7 @@ exports[`<Header /> renders correctly for authenticated mobile 1`] = `
height="24px"
role="img"
style={
{
Object {
"height": "1.5rem",
"width": "1.5rem",
}
Expand Down
5 changes: 1 addition & 4 deletions src/learning-header/LearningHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,12 @@ LinkedLogo.propTypes = {
src: PropTypes.string.isRequired,
alt: PropTypes.string.isRequired,
};

// this feature flag is not included on the frontend-platform, we have to get it directly from ENV
const enabledOrgLogo = process.env.ENABLED_ORG_LOGO || false;

const LearningHeader = ({
courseOrg, courseTitle, intl, showUserDropdown,
}) => {
const { authenticatedUser } = useContext(AppContext);
const [logoOrg, setLogoOrg] = useState(null);
const enabledOrgLogo = getConfig().ENABLED_ORG_LOGO || false;

useEffect(() => {
if (courseOrg) {
Expand Down

0 comments on commit e1f358a

Please sign in to comment.