fix: Hard-coded link in Header component changed by LMS_BASE_URL env 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
This commit is contained in:
Chris Chávez
2021-06-14 12:51:20 -05:00
committed by GitHub
parent 7acefe0468
commit 02c154ef50

View File

@@ -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 />