PlanLineList.js 804 Bytes
Newer Older
Kim, Subin's avatar
Kim, Subin committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { Link } from "react-router-dom";
import styles from "../Form/form.module.scss";

const PlanLineList = ({ subjectId, planList = [] }) => {
    return (
        <>
            {planList.length !== 0 ? planList.map(plan => <div className="d-flex justify-content-between">
                <p className="card-text mb-1">- {plan.title}</p>
                <input className={`form-check-input shadow-none ${styles.checkBox}`} type="checkbox" />
            </div>) : <Link className="text-decoration-none link-dark" to={`/studyplan/edit/add/${subjectId}`}>
            <div className="d-flex">
              <i className="bi bi-plus"></i>
              <p className="card-text mb-1">새로운 계획 추가하기</p>
            </div>
          </Link>}
        </>
    )
}

export default PlanLineList