Removed API's in favor of statically linked files
This commit is contained in:
parent
d484ffc0db
commit
17f86b4be4
7 changed files with 30 additions and 96 deletions
components
|
@ -1,13 +1,7 @@
|
|||
import { usePathname } from 'next/navigation'
|
||||
import { NavBar, NavLink, NavWrap } from './styles/navbar';
|
||||
import { StyleSelector, StyleSelectorPlaceholder } from './themeselector';
|
||||
|
||||
const navLinks = [
|
||||
{ name: "Home", href: "/" },
|
||||
{ name: "About", href: "/about" },
|
||||
{ name: "Games", href: "/games" },
|
||||
{ name: "Services", href: "/services" }
|
||||
]
|
||||
import Links from '../public/data/navbar.json';
|
||||
|
||||
const PageNavbar = () => {
|
||||
const path = usePathname();
|
||||
|
@ -16,8 +10,8 @@ const PageNavbar = () => {
|
|||
<NavWrap>
|
||||
<StyleSelector></StyleSelector>
|
||||
<NavBar>
|
||||
{navLinks.map((item) => (
|
||||
<NavLink active={path == item.href ? true : false} key={item.name} href={item.href}>
|
||||
{Links.links.map((item) => (
|
||||
<NavLink active={path === item.href ? +true : +false} key={item.name} href={item.href}>
|
||||
{item.name}
|
||||
</NavLink>
|
||||
))}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue