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

This commit is contained in:
Mikola
2024-02-07 18:54:21 +03:00
parent 455be87e26
commit b75b846335
13 changed files with 91 additions and 108 deletions

View File

@ -98,7 +98,7 @@ export const ProfileCalendar = () => {
{profileInfo.specification} разработчик
</p>
</div>
<Link to="/report">
<Link to="/profile/calendar/report">
<button
className="calendar__btn"
onClick={() => dispatch(setReportDate(""))}

View File

@ -96,9 +96,9 @@ export const ProfileCalendarComponent = React.memo(
)}-${correctDay(new Date(day).getDate())}` === date.created_at
) {
if (userId) {
return `../view/${date.created_at}/${userId}`;
return `/profile/calendar/view/${date.created_at}/${userId}`;
}
return `../view/${date.created_at}/${localStorage.getItem("id")}`;
return `/profile/calendar/view/${date.created_at}/${localStorage.getItem("id")}`;
}
}
@ -106,7 +106,7 @@ export const ProfileCalendarComponent = React.memo(
return "#";
}
return "../../report";
return "/profile/calendar/report";
}
const prevMonth = () => value.clone().subtract(1, "month");