CoursesPage - display courses
parent
2061371670
commit
0fa1f83aa9
|
@ -31,13 +31,17 @@ class CoursesPage extends React.Component {
|
||||||
value={this.state.course.title}
|
value={this.state.course.title}
|
||||||
/>
|
/>
|
||||||
<input type="submit" value="Save" />
|
<input type="submit" value="Save" />
|
||||||
|
{this.props.courses.map((course) => (
|
||||||
|
<div key={course.title}>{course.title}</div>
|
||||||
|
))}
|
||||||
</form>
|
</form>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CoursesPage.propTypes = {
|
CoursesPage.propTypes = {
|
||||||
dispatch: PropTypes.func.isRequired
|
dispatch: PropTypes.func.isRequired,
|
||||||
|
courses: PropTypes.array.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
function mapStateToProps(state) {
|
function mapStateToProps(state) {
|
||||||
|
|
Loading…
Reference in New Issue