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:
Kyle McCormick
2022-11-28 11:14:32 -05:00
committed by GitHub
parent 50bf7d236a
commit 4f43e65f03
9 changed files with 49 additions and 33 deletions

View File

@@ -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() || '';