index.js 606 Bytes
Newer Older
zhanghaozhe committed
1
import React from 'react'
xuzhenghua committed
2
import './course.scss'
zhanghaozhe committed
3
import {Link} from "react-router-dom"
xuzhenghua committed
4 5 6

const Course = (props) => {
    return (
zhanghaozhe committed
7
        <li className={`course-item ${props.className}`}>
xuzhenghua committed
8
            {props.top}
9 10
            <a onClick={() => props.toDetail(props.id)}>
            {/* <Link to={`/detail?id=${props.id}`}> */}
xuzhenghua committed
11
                <img src={props.img} alt=""/>
xuzhenghua committed
12
                {props.status}
xuzhenghua committed
13
                <p className={`course-title ${props.className}`}>{props.title}</p>
14 15
            {/* </Link> */}
            </a>
xuzhenghua committed
16 17 18 19 20 21 22
            {props.bottom}
        </li>
    );
};

export default Course;