fix: added LMS_BASE_URL for brand logo (#498)
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
import React from 'react';
|
||||
|
||||
import { useIntl } from '@edx/frontend-platform/i18n';
|
||||
|
||||
import { reduxHooks } from 'hooks';
|
||||
@@ -12,7 +10,7 @@ export const BrandLogo = () => {
|
||||
const dashboard = reduxHooks.useEnterpriseDashboardData();
|
||||
|
||||
return (
|
||||
<a href={dashboard?.url || '/'} className="mx-auto">
|
||||
<a href={dashboard?.url || getConfig().LMS_BASE_URL} className="mx-auto">
|
||||
<img
|
||||
className="logo py-3"
|
||||
src={getConfig().LOGO_URL}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { shallow } from '@edx/react-unit-test-utils';
|
||||
|
||||
import { getConfig } from '@edx/frontend-platform';
|
||||
import { reduxHooks } from 'hooks';
|
||||
|
||||
import BrandLogo from './BrandLogo';
|
||||
|
||||
jest.mock('hooks', () => ({
|
||||
@@ -23,6 +24,6 @@ describe('BrandLogo', () => {
|
||||
reduxHooks.useEnterpriseDashboardData.mockReturnValueOnce(null);
|
||||
const wrapper = shallow(<BrandLogo />);
|
||||
expect(wrapper.snapshot).toMatchSnapshot();
|
||||
expect(wrapper.instance.findByType('a')[0].props.href).toEqual('/');
|
||||
expect(wrapper.instance.findByType('a')[0].props.href).toEqual(getConfig().LMS_BASE_URL);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -16,7 +16,7 @@ exports[`BrandLogo dashboard defined 1`] = `
|
||||
exports[`BrandLogo dashboard undefined 1`] = `
|
||||
<a
|
||||
className="mx-auto"
|
||||
href="/"
|
||||
href="http://localhost:18000"
|
||||
>
|
||||
<img
|
||||
alt="edX, Inc. Dashboard"
|
||||
|
||||
Reference in New Issue
Block a user