StudyPlanCard.js 1.05 KB
Newer Older
Choi Ga Young's avatar
Choi Ga Young committed
1
import { Link } from "react-router-dom";
Kim, Subin's avatar
Kim, Subin committed
2
import PlanLineList from "./PlanLineList";
Choi Ga Young's avatar
Choi Ga Young committed
3

Kim, Subin's avatar
Kim, Subin committed
4
5
const StudyPlanCard = ({ renList, handleClick }) => {

Choi Ga Young's avatar
Choi Ga Young committed
6
  return (
Kim, Subin's avatar
Kim, Subin committed
7
    <div className="card text-decoration-none link-dark mb-3" style={{ width: "20rem" }} >
Kim, Subin's avatar
Kim, Subin committed
8
9
10
11
12
      <div className="card-body">
        <div className="d-flex">
          <h5 className="card-title col-10 text-nowrap" style={{ overflow: "hidden", textOverflow: "ellipsis" }}>{renList.name}</h5>
          <div className="col-2 d-flex justify-content-end">
            <Link className="text-decoration-none link-dark" to={`/subject/edit/${renList.id}`}><i className="bi bi-pencil-square pe-2"></i></Link>
Kim, Subin's avatar
Kim, Subin committed
13
14
            <i className="bi bi-trash" onClick={() => handleClick(renList.id)}>
            </i>
Choi Ga Young's avatar
Choi Ga Young committed
15
          </div>
Choi Ga Young's avatar
Choi Ga Young committed
16
        </div>
Kim, Subin's avatar
Kim, Subin committed
17
18
19
        <p className="card-subtitle ms-1 mb-2 text-muted">{renList.prof && renList.room ? renList.prof + ' - ' + renList.room : (renList.prof || renList.room)}</p>
        <PlanLineList subjectId={renList.id} planList={renList.planList} />
      </div>
Kim, Subin's avatar
Kim, Subin committed
20
    </div>
Choi Ga Young's avatar
Choi Ga Young committed
21
22
23
  )
}

Choi Ga Young's avatar
Choi Ga Young committed
24
export default StudyPlanCard;