active links in nav, delete report, loaders in report, changes routes

This commit is contained in:
Mikola
2024-02-07 18:54:55 +03:00
parent b75b846335
commit 1fd6a73652
6 changed files with 51 additions and 30 deletions

View File

@ -87,12 +87,12 @@ const ReportForm = () => {
};
const handler = () => {
setIsFetching(true)
setIsFetching(true);
for (let input of inputs) {
if (!input.task || !input.hours_spent) {
setReportSuccess("Заполните задачи");
setTimeout(() => setReportSuccess(""), 2000);
setIsFetching(false)
setIsFetching(false);
return;
}
}
@ -294,15 +294,16 @@ const ReportForm = () => {
<div className="row">
<div className="col-12">
<div className="report-form__footer">
{isFetching ?
<Loader style={'green'} /> :
{isFetching ? (
<Loader style={"green"} />
) : (
<button
className="report-form__footer-btn"
onClick={() => handler()}
>
Отпаравить
</button>
}
)}
<p className="report-form__footer-text">
Всего за день:{" "}
<span>