fix: Editors should support runtime configuration

Fetching settings directly via `process.env` circumvents the runtime
configuration mechanism.  Change the editor page to use `getConfig()`
instead.
This commit is contained in:
Adolfo R. Brandes
2022-12-13 13:51:56 -03:00
committed by Adolfo R. Brandes
parent 7253c9bba3
commit 2f6eed237a

View File

@@ -2,6 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import { useParams } from 'react-router';
import { EditorPage } from '@edx/frontend-lib-content-components';
import { getConfig } from '@edx/frontend-platform';
const EditorContainer = ({
courseId,
@@ -13,8 +14,8 @@ const EditorContainer = ({
courseId={courseId}
blockType={blockType}
blockId={blockId}
studioEndpointUrl={process.env.STUDIO_BASE_URL}
lmsEndpointUrl={process.env.LMS_BASE_URL}
studioEndpointUrl={getConfig().STUDIO_BASE_URL}
lmsEndpointUrl={getConfig().LMS_BASE_URL}
/>
</div>
);