Переписываю спорные решения

This commit is contained in:
2023-01-16 19:12:44 +03:00
parent e15ce861a3
commit 1d8b30370d
15 changed files with 97 additions and 223 deletions

View File

@ -18,13 +18,12 @@ export const ProfileCalendar = () => {
const [month, setMonth] = useState('');
const [reports, setReports] = useState([]);
const [totalHours, setTotalHours] = useState(0);
const [value, setValue] = useState(moment());
const [requestDates, setRequestDates] = useState('');
const {apiRequest} = useRequest();
useEffect(() => {
setRequestDates(getReports(value))
setRequestDates(getReports(moment()))
});
useEffect(async () => {
@ -69,7 +68,7 @@ export const ProfileCalendar = () => {
<div>
<Link to='/report'>
<button className='calendar__btn' onClick={() => {
dispatch(setReportDate(value))
dispatch(setReportDate(moment()))
}}>Заполнить отчет за день</button>
</Link>
</div>