As a user, when I navigate to the courses page I will see a headline that says "Find Courses", and underneath will be all of the courses that are listed.
As a user, if I find a course that I want to look at, there will be a button on that course listing that will take me to that single course.
AC
WHEN a user navigates to the course search page
THEN they should see a headline that says "Find Courses"
AND they should see a listing of all the courses offered
AND they should be able to click on a course that will take them to the SingleCourse route.
DevNotes
The layout of the page should follow how it's listed here: #1
First thing we should do is create a new component in the Shared folder called SingleCourseCard. Inside of this folder, create SingleCourseCard.js and SingleCourseCard.scss.
Inside of the SingleCourseCard.js file we will be creating the card which we will map over in Courses.js.
First, lets import these statements in SingleCourseCard.js:
import React from 'react';
import { Link } from 'react-router-dom';
import './SingleCourseCard.scss';
UserStory
AC
WHEN a user navigates to the course search page THEN they should see a headline that says "Find Courses" AND they should see a listing of all the courses offered AND they should be able to click on a course that will take them to the SingleCourse route.
DevNotes
Shared
folder calledSingleCourseCard
. Inside of this folder, createSingleCourseCard.js and SingleCourseCard.scss
.SingleCourseCard.js
file we will be creating the card which we will map over inCourses.js
.SingleCourseCard.js
:SingleCourseCard
const { course } = this.props;
const { courses } = this.props;
SingleCourseCard
like this: