From 3371a13420a453d12a6c4bd153cd083f357187e2 Mon Sep 17 00:00:00 2001 From: phucmapcaumieu Date: Sun, 17 Sep 2023 20:41:10 +0700 Subject: [PATCH] use NavLink instead of Link to avoid using active class --- src/components/common/navBar.jsx | 60 +++++++------------------ src/components/common/styles/navBar.css | 2 +- src/pages/about.jsx | 2 +- src/pages/articles.jsx | 2 +- src/pages/contact.jsx | 2 +- src/pages/homepage.jsx | 2 +- src/pages/projects.jsx | 2 +- 7 files changed, 22 insertions(+), 50 deletions(-) diff --git a/src/components/common/navBar.jsx b/src/components/common/navBar.jsx index 6768cb861..23d7b666e 100644 --- a/src/components/common/navBar.jsx +++ b/src/components/common/navBar.jsx @@ -1,61 +1,33 @@ import React from "react"; -import { Link } from "react-router-dom"; +import { NavLink } from "react-router-dom"; import "./styles/navBar.css"; -const NavBar = (props) => { - const { active } = props; - +const NavBar = () => { return (