StudyPlanCard.js 1.29 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
import style from "./studyplan.module.scss";
Choi Ga Young's avatar
Choi Ga Young committed
4

Choi Ga Young's avatar
Choi Ga Young committed
5
const StudyPlanCard = ({ renList, handleClick, handleEdit }) => {
Kim, Subin's avatar
Kim, Subin committed
6

Choi Ga Young's avatar
Choi Ga Young committed
7
  return (
Kim, Subin's avatar
Kim, Subin committed
8
    <Link className="card text-decoration-none link-dark mb-3" to={`/studyplan/${renList.id}`} style={{ width: "20rem" }} >
Choi Ga Young's avatar
Choi Ga Young committed
9
      <div className="card-body" style={{ height: "150px" }}>
Kim, Subin's avatar
Kim, Subin committed
10
11
12
13
        <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
14
            <i className="bi bi-trash" onClick={(e) => handleClick(e, renList.id)}>
Kim, Subin's avatar
Kim, Subin committed
15
            </i>
Choi Ga Young's avatar
Choi Ga Young committed
16
          </div>
Choi Ga Young's avatar
Choi Ga Young committed
17
        </div>
Kim, Subin's avatar
Kim, Subin committed
18
        <p className="card-subtitle ms-1 mb-2 text-muted">{renList.prof && renList.room ? renList.prof + ' - ' + renList.room : (renList.prof || renList.room)}</p>
Choi Ga Young's avatar
Choi Ga Young committed
19
20
21
        <div className={`${style.inCard}`} style={{ height: "60px" }}>
          <PlanLineList subjectId={renList.id} planList={renList.planList} handleClick={handleEdit} />
        </div>
Kim, Subin's avatar
Kim, Subin committed
22
      </div>
Kim, Subin's avatar
Kim, Subin committed
23
    </Link>
Choi Ga Young's avatar
Choi Ga Young committed
24
25
26
  )
}

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