diff --git a/catalog-info.yaml b/catalog-info.yaml index 1d231394..fe60bcab 100644 --- a/catalog-info.yaml +++ b/catalog-info.yaml @@ -14,6 +14,6 @@ metadata: title: "Stage Site" icon: "Web" spec: - owner: "group:openedx-unmaintained" + owner: codewithemad type: 'website' lifecycle: 'production' diff --git a/src/data/constants/app.js b/src/data/constants/app.js index cd6236f7..d314bff2 100644 --- a/src/data/constants/app.js +++ b/src/data/constants/app.js @@ -1,4 +1,5 @@ -import { getConfig } from '@edx/frontend-platform'; +import { getConfig, getPath } from '@edx/frontend-platform'; -export const routePath = () => `${getConfig().PUBLIC_PATH}:courseId`; -export const locationId = () => decodeURIComponent(window.location.pathname).replace(getConfig().PUBLIC_PATH, ''); +const publicPath = getPath(getConfig().PUBLIC_PATH); +export const routePath = () => `${publicPath}:courseId`; +export const locationId = () => decodeURIComponent(window.location.pathname).replace(publicPath, ''); diff --git a/src/data/constants/app.test.js b/src/data/constants/app.test.js index 21908022..232dc623 100644 --- a/src/data/constants/app.test.js +++ b/src/data/constants/app.test.js @@ -6,6 +6,7 @@ jest.unmock('./app'); jest.mock('@edx/frontend-platform', () => { const PUBLIC_PATH = '/test-public-path/'; return { + ...jest.requireActual('@edx/frontend-platform'), getConfig: () => ({ PUBLIC_PATH }), PUBLIC_PATH, };