From 0fa1f83aa95a1861ab7c4ba6d891c06f4472e726 Mon Sep 17 00:00:00 2001 From: Tudor Stanciu Date: Sat, 11 Apr 2020 19:27:53 +0300 Subject: [PATCH] CoursesPage - display courses --- src/components/courses/CoursesPage.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/courses/CoursesPage.js b/src/components/courses/CoursesPage.js index 86735d8..8c0803b 100644 --- a/src/components/courses/CoursesPage.js +++ b/src/components/courses/CoursesPage.js @@ -31,13 +31,17 @@ class CoursesPage extends React.Component { value={this.state.course.title} /> + {this.props.courses.map((course) => ( +
{course.title}
+ ))} ); } } CoursesPage.propTypes = { - dispatch: PropTypes.func.isRequired + dispatch: PropTypes.func.isRequired, + courses: PropTypes.array.isRequired }; function mapStateToProps(state) {