We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d5acab commit fcce64aCopy full SHA for fcce64a
frontend/src/index.jsx
@@ -1,4 +1,4 @@
1
-import customCourseListPlugin from './plugin'
+import CourseList from './plugin'
2
3
/* 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}
+export {CourseList}
frontend/src/plugin.jsx
@@ -1,5 +1,7 @@
-function customCourseListPlugin(courseListData) {
+import React from 'react';
+const CourseList = ({courseListData}) => {
+ // Extract the "visibleList"
5
const courses = courseListData.visibleList;
6
// Render a list of course names
7
return (
@@ -12,3 +14,5 @@ function customCourseListPlugin(courseListData) {
12
14
</div>
13
15
)
16
}
17
+
18
+export default CourseList;
0 commit comments