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

@ -9,7 +9,6 @@ import { urlForLocal } from "@utils/helper";
import avatarMok from "assets/images/avatarMok.png";
export const Navigation = () => {
const profileInfo = useSelector(getProfileInfo);
const currentPath = window.location.pathname;
const [user] = useState(
@ -81,7 +80,7 @@ export const Navigation = () => {
key={index}
end
to={link.path === "/Quiz" ? link.path : `/profile${link.path}`}
className={currentPath. includes(link.path) ? 'active' : ''}
className={currentPath.includes(link.path) ? "active" : ""}
>
{link.name}
</NavLink>