guardian routes
This commit is contained in:
@ -70,6 +70,7 @@ export const AuthBox = ({ title }) => {
|
||||
dispatch(setUserInfo(res));
|
||||
dispatch(loading(false));
|
||||
dispatch(setRole("ROLE_PARTNER"));
|
||||
navigate("/profile");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -24,9 +24,9 @@ export const AuthHeader = () => {
|
||||
<span>Главная</span>
|
||||
</NavLink>
|
||||
</li>
|
||||
<li>
|
||||
<NavLink to={"/profile"}>Кабинет разработчика</NavLink>
|
||||
</li>
|
||||
{/*<li>*/}
|
||||
{/* <NavLink to={"/profile"}>Кабинет разработчика</NavLink>*/}
|
||||
{/*</li>*/}
|
||||
<li>
|
||||
<NavLink to={"/tracker-intro"}>Трекер</NavLink>
|
||||
</li>
|
||||
|
@ -81,7 +81,7 @@ export const Navigation = () => {
|
||||
<NavLink
|
||||
key={index}
|
||||
end
|
||||
to={link.path === "/quiz" ? link.path : `/profile${link.path}`}
|
||||
to={`/profile${link.path}`}
|
||||
className={
|
||||
currentPath.includes(link.path) ||
|
||||
currentPath.includes(link.active)
|
||||
|
@ -91,11 +91,10 @@ export const ProfileHeader = () => {
|
||||
});
|
||||
}, []);
|
||||
|
||||
const handler = () => {
|
||||
setIsLoggingOut(true);
|
||||
const handler = (e) => {
|
||||
e.preventDefault()
|
||||
localStorage.clear();
|
||||
dispatch(auth(false));
|
||||
setIsLoggingOut(false);
|
||||
navigate("/auth");
|
||||
dispatch(setProfileInfo({}));
|
||||
};
|
||||
|
Reference in New Issue
Block a user