PlanLineList.js 909 Bytes
Newer Older
Kim, Subin's avatar
Kim, Subin committed
1
import { Link } from "react-router-dom";
Kim, Subin's avatar
Kim, Subin committed
2
import styles from "./studyplan.module.scss";
Kim, Subin's avatar
Kim, Subin committed
3
4

const PlanLineList = ({ subjectId, planList = [] }) => {
Kim, Subin's avatar
Kim, Subin committed
5
6
7
8
9
10
11
12
13
14
15
16
17
  return (
    <>
      {planList.length !== 0 ? planList.map(plan => <div className="d-flex justify-content-between">
        <Link to={`/studyplan/${subjectId}`} className={`col-11 card-text text-decoration-none link-dark mb-1 ${styles.text}`}>- {plan.title}</Link>
        <div className="col d-flex justify-content-end">
          <input className={`form-check-input shadow-none ${styles.checkBox}`} type="checkbox" onClick={() => console.log("checkbox clicke")} />
        </div>
      </div>) : <Link className="d-flex text-decoration-none link-dark" to={`/studyplan/submit/${subjectId}`}>
        <i className="bi bi-plus"></i>
        <p className="card-text mb-1">새로운 계획 추가하기</p>
      </Link>}
    </>
  )
Kim, Subin's avatar
Kim, Subin committed
18
19
20
}

export default PlanLineList