Menu.js 3.78 KB
Newer Older
Kim, Subin's avatar
Kim, Subin committed
1
import { Link } from "react-router-dom";
2
import { useAuth } from "../../utils/context.js";
Kim, Subin's avatar
Monthly    
Kim, Subin committed
3
import moment from "moment";
4
5
import styles from "./menu.module.scss";

Kim, Subin's avatar
Kim, Subin committed
6
const Menu = () => {
7
    const { logout } = useAuth();
Kim, Subin's avatar
Kim, Subin committed
8

Kim, Subin's avatar
Kim, Subin committed
9
    return (
10
11
12
13
14
        <>
            <button className="btn btn-crimson shadow-none mt-2" type="button" data-bs-toggle="collapse" data-bs-target="#menuContent" aria-controls="menuContent" aria-expanded="false" aria-label="menu">
                <i className="bi bi-list fs-4"></i>
            </button>
            <div className={`collapse collapse-horizontal position-absolute top-0 start-0 h-100 ${styles.content}`} id="menuContent">
Kim, Subin's avatar
Kim, Subin committed
15
16
17
                <div className="d-flex flex-column" style={{ transition: ".15s ease", height: "inherit" }}>
                    <button type="button" className={`btn-close btn-close-white btn-lg position-absolute ${styles.close}`} data-bs-toggle="collapse" data-bs-target="#menuContent" aria-controls="menuContent" aria-expanded="true" aria-label="menu"></button>
                    <div className="d-flex flex-column align-items-center text-white py-5" style={{ backgroundColor: "crimson" }}>
Kim, Subin's avatar
Kim, Subin committed
18
                        <h1 className="my-3">김수빈 </h1>
Kim, Subin's avatar
Kim, Subin committed
19
                        <h2 className="my-2">오늘의 목표 95% 달성!</h2>
Kim, Subin's avatar
Kim, Subin committed
20
                    </div>
Kim, Subin's avatar
Kim, Subin committed
21
22
23
                    <div className="d-flex flex-column justify-content-between flex-grow-1 py-4 ps-3 text-dark" >
                        <div className="user-select-none w-75 ps-3">
                            <h2 className="mb-5">To-do</h2>
Kim, Subin's avatar
Kim, Subin committed
24
                            <div className="d-flex mt-2">
Kim, Subin's avatar
Kim, Subin committed
25
                                <p className={`form-check-label border-bottom border-2 fs-5 pb-1 me-3 ${styles.title}`}>sdasdsasdasdsadsadsadsadsadsadsadaddad</p>
Kim, Subin's avatar
Kim, Subin committed
26
27
28
                                <input className={`form-check-input rounded-0 border-dark shadow-none mt-1 ${styles.checkBox}`} type="checkbox" id="inlineCheckbox1" value="" aria-label="checkbox" />
                            </div>
                            <div className="d-flex">
Kim, Subin's avatar
Kim, Subin committed
29
                                <p className={`form-check-label border-bottom border-2 fs-5 pb-1 me-3 ${styles.title}`}>sdasdsadad</p>
Kim, Subin's avatar
Kim, Subin committed
30
31
32
                                <input className={`form-check-input rounded-0 border-dark shadow-none mt-1 ${styles.checkBox}`} type="checkbox" id="inlineCheckbox1" value="" aria-label="checkbox" />
                            </div>
                            <div className="d-flex">
Kim, Subin's avatar
Kim, Subin committed
33
                                <p className={`form-check-label border-bottom border-2 fs-5 pb-1 me-3 ${styles.title}`}>sdasdsadad</p>
Kim, Subin's avatar
Kim, Subin committed
34
35
                                <input className={`form-check-input rounded-0 border-dark shadow-none mt-1 ${styles.checkBox}`} type="checkbox" id="inlineCheckbox1" value="" aria-label="checkbox" />
                            </div>
Kim, Subin's avatar
Kim, Subin committed
36
                            <Link className="d-flex justify-content-center text-dark text-decoration-none" to={`/todo/${moment().format("YYYY-MM-DD")}`}>
Kim, Subin's avatar
Kim, Subin committed
37
38
39
40
41
                                <i className="bi bi-plus-lg me-2"></i>
                                <p className="mb-0">더보기</p>
                            </Link>
                        </div>
                        <div className="d-flex flex-column">
Kim, Subin's avatar
Monthly    
Kim, Subin committed
42
                            <Link className="text-dark text-decoration-none" to={`/schedule/${moment().format("YYYY-MM-DD")}`}><i className="bi bi-check"></i>일정</Link>
Kim, Subin's avatar
Kim, Subin committed
43
44
                            <Link className="text-dark text-decoration-none" to="/studyplan"><i className="bi bi-check"></i>학업별 계획</Link>
                        </div>
45
                        <p className={`position-absolute bottom-0 text-dark ${styles.logout}`} onClick={logout}>로그아웃</p>
Kim, Subin's avatar
Kim, Subin committed
46
47
                    </div>
                </div>
48
49
            </div>
        </>
Kim, Subin's avatar
Kim, Subin committed
50
51
52
53
    )
}

export default Menu