From 229691cbc792f670055f75a7843d690e2f0dd196 Mon Sep 17 00:00:00 2001 From: Tudor Stanciu Date: Sat, 11 Apr 2020 03:14:24 +0300 Subject: [PATCH] CoursesPage handleSubmit --- src/components/courses/CoursesPage.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/courses/CoursesPage.js b/src/components/courses/CoursesPage.js index c7f9e6b..66b09ce 100644 --- a/src/components/courses/CoursesPage.js +++ b/src/components/courses/CoursesPage.js @@ -12,9 +12,14 @@ class CoursesPage extends React.Component { this.setState({ course }); }; + handleSubmit = (event) => { + event.preventDefault(); + alert(this.state.course.title); + }; + render() { return ( -
+

Courses

Add Course