PlanLineList.js 857 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
5

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

export default PlanLineList