fix: change logo anchor tag to link to the LMS

This commit is contained in:
Ayrton Lima
2022-02-08 22:38:06 -03:00
parent 2b56d270a2
commit 7982251640
4 changed files with 10 additions and 4 deletions

View File

@@ -21,6 +21,7 @@ Environment Variables
This component requires that the following environment variable be set by the consuming micro-frontend.
* ``LMS_BASE_URL`` - The URL of the LMS of your Open edX instance.
* ``LOGO_TRADEMARK_URL`` - This is a URL to a logo for use in the footer. This is a different environment variable than ``LOGO_URL`` (used in frontend-component-header) to accommodate sites that would like to have additional trademark information on a logo in the footer, such as a (tm) or (r) symbol.
************

View File

@@ -9,6 +9,7 @@ import messages from './Footer.messages';
import LanguageSelector from './LanguageSelector';
ensureConfig([
'LMS_BASE_URL',
'LOGO_TRADEMARK_URL',
], 'Footer component');
@@ -58,7 +59,7 @@ class SiteFooter extends React.Component {
<div className="container-fluid d-flex">
<a
className="d-block"
href="https://open.edx.org"
href={config.LMS_BASE_URL}
aria-label={intl.formatMessage(messages['footer.logo.ariaLabel'])}
>
<img

View File

@@ -17,6 +17,7 @@ describe('<Footer />', () => {
authenticatedUser: null,
config: {
LOGO_TRADEMARK_URL: process.env.LOGO_TRADEMARK_URL,
LMS_BASE_URL: process.env.LMS_BASE_URL,
},
}}
>
@@ -36,6 +37,7 @@ describe('<Footer />', () => {
authenticatedUser: null,
config: {
LOGO_TRADEMARK_URL: process.env.LOGO_TRADEMARK_URL,
LMS_BASE_URL: process.env.LMS_BASE_URL,
},
}}
>
@@ -55,6 +57,7 @@ describe('<Footer />', () => {
authenticatedUser: null,
config: {
LOGO_TRADEMARK_URL: process.env.LOGO_TRADEMARK_URL,
LMS_BASE_URL: process.env.LMS_BASE_URL,
},
}}
>
@@ -83,6 +86,7 @@ describe('<Footer />', () => {
authenticatedUser: null,
config: {
LOGO_TRADEMARK_URL: process.env.LOGO_TRADEMARK_URL,
LMS_BASE_URL: process.env.LMS_BASE_URL,
},
}}
>

View File

@@ -11,7 +11,7 @@ exports[`<Footer /> renders correctly renders with a language selector 1`] = `
<a
aria-label="edX Home"
className="d-block"
href="https://open.edx.org"
href="http://localhost:18000"
>
<img
alt="Powered by Open edX"
@@ -83,7 +83,7 @@ exports[`<Footer /> renders correctly renders without a language selector 1`] =
<a
aria-label="edX Home"
className="d-block"
href="https://open.edx.org"
href="http://localhost:18000"
>
<img
alt="Powered by Open edX"
@@ -113,7 +113,7 @@ exports[`<Footer /> renders correctly renders without a language selector in es
<a
aria-label="edX Home"
className="d-block"
href="https://open.edx.org"
href="http://localhost:18000"
>
<img
alt="Powered by Open edX"