-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Description
Summary :
The Header.js component uses hardcoded navigation links and the Main.js container uses an older version of react-router-dom (Switch). Modernizing the routing and making the header data-driven would improve maintainability.
File Path : components/header/Header.js and containers/Main.js
Code Improvement :
// Suggested change in Header.js to use a configuration file
import { greeting } from "../../portfolio.js"; // Assume data is centralized
// Instead of hardcoded <li> tags, map through a config
{navigation_links.map((link) => (
<li key={link.id}>
<NavLink to={link.to} activeStyle={{ fontWeight: "bold" }}>
{link.name}
</NavLink>
</li>
))}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels