AdminScheduleItem.js 1.11 KB
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 "./Schedule/schedule.module.scss";
Kim, Subin's avatar
Kim, Subin committed
3

4
5
const AdminScheduleItem = ({ schedule, handleClick }) => {

Kim, Subin's avatar
Kim, Subin committed
6
7
    return (
        <div className="d-flex mb-5">
8
9
10
11
12
13
14
            <i className="bi bi-check-lg fs-4 col me-2"></i>
            <div className="col-11">
                <div className="d-flex">
                    <h3 className="col-10 rows-cols-2">{schedule.title}</h3>
                    <div className="d-flex col-2 fs-5">
                        <Link to={`/admin/edit/${schedule.id}`}><i className="bi bi-pencil-square text-dark me-2" data-bs-dismiss="modal"></i></Link>
                        <i className="bi bi-trash" onClick={() => handleClick(schedule.id)}></i>
Kim, Subin's avatar
Kim, Subin committed
15
16
                    </div>
                </div>
17
18
19
20
                <p className="text-start text-secondary mb-2">
                    {(schedule.start === schedule.end) ? schedule.start : schedule.start + "~" + schedule.end}
                </p>
                <div className={`text-start ${styles.textBox}`}>{schedule.memo}</div>
Kim, Subin's avatar
Kim, Subin committed
21
22
23
24
25
26
            </div>
        </div>
    )
}

export default AdminScheduleItem