feat: connect to bff

This commit is contained in:
Ben Warzeski
2022-08-23 12:23:28 -04:00
parent f5ce920865
commit 08141acd16
6 changed files with 17 additions and 19 deletions

View File

@@ -1,3 +1,6 @@
import { getConfig } from '@edx/frontend-platform';
import { get } from './utils';
import fakeData from 'data/services/lms/fakeData/courses';
/*
import { StrictDict } from 'utils';
@@ -15,12 +18,18 @@ import {
/*********************************************************************************
* GET Actions
*********************************************************************************/
const initializeList = () => Promise.resolve({
courses: [
...fakeData.courseRunData,
...fakeData.entitlementData,
],
...fakeData.globalData,
});
const initializeList = () => {
const url = `${getConfig().LMS_BASE_URL}/learner/mock/home`;
console.log({ url });
get(url).then(console.log);
return Promise.resolve({
courses: [
...fakeData.courseRunData,
...fakeData.entitlementData,
],
...fakeData.globalData,
});
};
export default { initializeList };

View File

@@ -22,7 +22,6 @@ export const relatedPrograms = [
programUrl: 'www.edx/my-program',
programType: 'MicroBachelors Program',
numberOfCourses: 3,
estimatedNumberOfWeeks: 4,
},
{
provider: 'University of Maryland',
@@ -33,7 +32,6 @@ export const relatedPrograms = [
programType: 'MicroBachelors Program',
programTypeUrl: 'www.edx/my-program-type',
numberOfCourses: 3,
estimatedNumberOfWeeks: 4,
},
];