Skip to content

Commit fcce64a

Browse files
committed
Change how we export the new CourseList component.
1 parent 7d5acab commit fcce64a

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

frontend/src/index.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import customCourseListPlugin from './plugin'
1+
import CourseList from './plugin'
22

33
/* If we want to add more plugins, we would import them above and then add them to the list of exports below. */
4-
export {customCourseListPlugin}
4+
export {CourseList}

frontend/src/plugin.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
function customCourseListPlugin(courseListData) {
1+
import React from 'react';
22

3+
const CourseList = ({courseListData}) => {
4+
// Extract the "visibleList"
35
const courses = courseListData.visibleList;
46
// Render a list of course names
57
return (
@@ -12,3 +14,5 @@ function customCourseListPlugin(courseListData) {
1214
</div>
1315
)
1416
}
17+
18+
export default CourseList;

0 commit comments

Comments
 (0)