Skip to content

Commit

Permalink
fix: Hard-coded link in Header component changed by LMS_BASE_URL env …
Browse files Browse the repository at this point in the history
…var (#186)

* feat: LOGO_DESTINATION env var added for use it on Header component

On index.js file of the Header component, currenly there is a hard-coded link of "https://www.edx.org". I added a new enviroment variable LOGO_DESTINATION to use it in this Header.
I have also added a mechanism to use the LMS_BASE_URL environment variable if the LOGO_DESTINATION environment variable is not found or is null.

* fix: Hard-coded link in Header component changed by a env var

`index.jsx` file of Header component updated with change the hard-coded link of https://www.edx.org with a component property.
`index.jsx` file of root project updated. Added the environment variable LMS BASE_URL to the parameters of the Header Component

* fix: lint errors in previous commits

* style: change structure of the solution
  • Loading branch information
ChrisChV committed Jun 14, 2021
1 parent 7acefe0 commit 02c154e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Header/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default class Header extends React.Component {
return (
<div className="mb-3">
<header className="d-flex justify-content-center align-items-center p-3 border-bottom-blue">
<Hyperlink destination="https://www.edx.org">
<Hyperlink destination={`${getConfig().LMS_BASE_URL}/dashboard`}>
{this.renderLogo()}
</Hyperlink>
<div />
Expand Down

0 comments on commit 02c154e

Please sign in to comment.