Removed API's in favor of statically linked files

This commit is contained in:
Neshura 2022-12-18 00:38:37 +01:00
parent d484ffc0db
commit 17f86b4be4
No known key found for this signature in database
GPG key ID: ACDF5B6EBECF6B0A
7 changed files with 30 additions and 96 deletions
components

View file

@ -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>
))}