fix: use getConfig in order to support runtime configuration (#286)
Before, gradebook was reading config from `process.env` directly, which locked the app into using only static (build-time) configuration. In order to enable dynamic (runtime) configuration, we update gradebook to use frontend-platform's standard configuration interface: `mergeConfig()` and `getConfig()`. Bumps version from 1.5.0 to 1.6.0. (I would normally just do a patch release for a fix, but the version was hasn't been bumped for a while, so adding in full runtime configuration support seemed like it warranted a proper minor version bump.) Co-authored-by: Ghassan Maslamani <ghassan.maslamani@gmail.com>
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { getConfig } from '@edx/frontend-platform';
|
||||
import { StrictDict } from 'utils';
|
||||
import { configuration } from 'config';
|
||||
import { historyRecordLimit } from './constants';
|
||||
import { filterQuery, stringifyUrl } from './utils';
|
||||
|
||||
const baseUrl = `${configuration.LMS_BASE_URL}`;
|
||||
const baseUrl = `${getConfig().LMS_BASE_URL}`;
|
||||
|
||||
const courseId = window.location.pathname.split('/').filter(Boolean).pop() || '';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user