diff --git a/src/components/Navigation/Navigation.jsx b/src/components/Navigation/Navigation.jsx index fb83c23a..cbac4365 100644 --- a/src/components/Navigation/Navigation.jsx +++ b/src/components/Navigation/Navigation.jsx @@ -73,8 +73,8 @@ export const Navigation = () => { if (localStorage.getItem("role_status") === "18") { return; } - apiRequest(`/profile/${localStorage.getItem("cardId")}`).then( - (profileInfo) => dispatch(setProfileInfo(profileInfo)) + apiRequest(`/user/me`).then((profileInfo) => + dispatch(setProfileInfo(profileInfo.userCard)) ); }, [dispatch]); diff --git a/src/components/ProfileCalendar/ProfileCalendarComponent.jsx b/src/components/ProfileCalendar/ProfileCalendarComponent.jsx index 3a862508..d7d78bde 100644 --- a/src/components/ProfileCalendar/ProfileCalendarComponent.jsx +++ b/src/components/ProfileCalendar/ProfileCalendarComponent.jsx @@ -329,6 +329,8 @@ export const ProfileCalendarComponent = React.memo( styles={"clear-days"} onClick={() => { resetRangeDays(); + toggleActivePeriod(); + toggleRangeDays(); }} > Сбросить diff --git a/src/components/ProfileHeader/ProfileHeader.jsx b/src/components/ProfileHeader/ProfileHeader.jsx index eb592312..96daa0fe 100644 --- a/src/components/ProfileHeader/ProfileHeader.jsx +++ b/src/components/ProfileHeader/ProfileHeader.jsx @@ -26,9 +26,9 @@ export const ProfileHeader = () => { if (localStorage.getItem("role_status") === "18") { return; } - apiRequest(`/profile/${localStorage.getItem("cardId")}`).then( - (profileInfo) => dispatch(setProfileInfo(profileInfo)) - ); + apiRequest(`/user/me`).then((profileInfo) => { + dispatch(setProfileInfo(profileInfo.userCard)); + }); }, [dispatch]); const handler = () => { diff --git a/src/pages/Tracker/Tracker.jsx b/src/pages/Tracker/Tracker.jsx index 3020d102..6ec7ac93 100644 --- a/src/pages/Tracker/Tracker.jsx +++ b/src/pages/Tracker/Tracker.jsx @@ -129,7 +129,7 @@ export const Tracker = () => { e.target.closest("img").classList.toggle("open-desc-item"); e.target .closest("td") - .querySelector(".taskList__table__name-project") + ?.querySelector(".taskList__table__name-project") .classList.toggle("hide-desc"); }