DateSet.js 636 Bytes
Newer Older
Kim, Subin's avatar
Kim, Subin committed
1
2
3
4
5
6
7
8
9
10
import moment from 'moment';
import styles from "./calendar.module.scss";

const DateSet = ({ index, info, today, handleClick }) => {
    const week = ['', '', '', '', '', '', '']

    return (
        <div className="col d-flex flex-column text-center" onClick={() => handleClick(info.date)}>
            <span className="text-center">{week[index]}</span>
            <span className={today ? `rounded-circle ${styles.today}` : ""}>{moment(info.date).format("DD")}</span>
Kim, Subin's avatar
Kim, Subin committed
11
            <span className="text-secondary">{info.rate !== "" ? info.rate + "%" : null}</span>
Kim, Subin's avatar
Kim, Subin committed
12
13
14
15
16
        </div>
    )
}

export default DateSet