Constructor
# <Course courses images loading title />
The Course component is used to display a course.
PropTypes:
Name | Type | Required | Description | Default |
---|---|---|---|---|
courses |
object | Yes | The courses object that has the course name, keywords, and course id | |
images |
arrayOf | Yes | The image array of objects coming from the unsplash API that has the url, alt description, and the id of the image | |
loading |
bool | Yes | A simple boolean to determine if the component is in a loading state or completed loading | |
title |
string | Yes | The course title that is extracted from the props object |
- To Do:
-
- Update this component to be implemented into the new design
The Course component
JSX.Element
Methods
# static filteredCourses(content, title, variantopt) → {React.ReactFragment}
The Course component is used to display a course.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
content |
Array
|
The array of course content objects to be filtered and rendered on the page |
|
data |
Object
|
The course content object that is rendered on the page |
|
data._id |
String
|
The course document ID |
|
data.courseName |
String
|
The course name |
|
data.keywords |
Array
|
<optional> |
The course keywords |
title |
string
|
The list title we want to use to contain the filtered list of courses |
|
variant |
string
|
<optional> |
The variant of the list that we are rendering. This should differentiate between recommended courses, enrolled courses, and other courses etc. |
- Deprecated:
- Yes
The Course component
React.ReactFragment