fixed calendar page
This commit is contained in:
parent
5be414307b
commit
b0ca345dbb
@ -35,20 +35,27 @@ const CalendarComponent = () => {
|
||||
}
|
||||
|
||||
function nextMonth() {
|
||||
return value.clone().add(1, 'month');
|
||||
return value.clone().subtract(2, 'month');
|
||||
}
|
||||
|
||||
const prevMonthFirst = () => {
|
||||
return moment().subtract(1, 'month').format('MMMM');
|
||||
};
|
||||
const prevMonthSecond = () => {
|
||||
return moment().subtract(2, 'month').format('MMMM');
|
||||
};
|
||||
|
||||
return (
|
||||
<div className={style.CalendarComponent}>
|
||||
<div className={style.CalendarComponent__header}>
|
||||
<h3>Мои отчеты</h3>
|
||||
<div className={style.CalendarComponent__header__box}>
|
||||
<img src={ellipse} alt="" />
|
||||
<span onClick={() => setValue(prevMonth())}>Май</span>
|
||||
<span onClick={() => setValue(prevMonth())}>{prevMonthFirst()}</span>
|
||||
</div>
|
||||
<div className={style.CalendarComponent__header__box}>
|
||||
<img src={ellipse} alt="" />
|
||||
<span onClick={() => setValue(nextMonth())}>Апрель</span>
|
||||
<span onClick={() => setValue(nextMonth())}>{prevMonthSecond()}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -51,7 +51,7 @@ const tabsList = [
|
||||
},
|
||||
];
|
||||
|
||||
const Home = ({ onTestFunc }) => {
|
||||
const Home = () => {
|
||||
const [tabs, setTabs] = useState([]);
|
||||
const [candidates, setCandidates] = useState([]);
|
||||
const [tags, setTags] = useState([]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user