Skip to content

Instantly share code, notes, and snippets.

@adeleke5140
Created October 22, 2023 01:36
Show Gist options
  • Save adeleke5140/bd3b5fa53b88be75b0012aa26df41bda to your computer and use it in GitHub Desktop.
Save adeleke5140/bd3b5fa53b88be75b0012aa26df41bda to your computer and use it in GitHub Desktop.
Navbar Links

Why an Array of links

There are times where you have got a navbar or a sidebar with a bunch of link items and custom styling for when the route is active.

Having an array of links makes it DRY. You don't have to needlessly repeat yourself especially when it comes to styling.

The above use case is one good example.

export const links: Link[] = [
{
href: "/",
name: "Dashboard",
},
{
href: "/marketplace",
name: "Marketplace",
},
{
href: "/portfolio",
name: "Portfolio",
}
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment