import React from 'react'
import './course.scss'
import {Link} from "react-router-dom"

const Course = (props) => {
    return (
        <li className={`course-item ${props.className}`}>
            {props.top}
            <a onClick={() => props.toDetail(props.id)}>
            {/* <Link to={`/detail?id=${props.id}`}> */}
                <img src={props.img} alt=""/>
                {props.status}
                <p className={`course-title ${props.className}`}>{props.title}</p>
            {/* </Link> */}
            </a>
            {props.bottom}
        </li>
    );
};

export default Course;

