2022-12-14 18:35:27 +00:00
|
|
|
import { usePathname } from 'next/navigation'
|
2022-12-15 20:36:15 +00:00
|
|
|
import { NavBar, NavLink, NavWrap } from './styles/navbar';
|
2022-12-15 21:33:40 +00:00
|
|
|
import { StyleSelector, StyleSelectorPlaceholder } from './themeselector';
|
2022-12-17 23:38:37 +00:00
|
|
|
import Links from '../public/data/navbar.json';
|
2022-12-03 20:02:13 +00:00
|
|
|
|
2022-12-15 20:23:34 +00:00
|
|
|
const PageNavbar = () => {
|
2022-12-14 18:35:27 +00:00
|
|
|
const path = usePathname();
|
2022-12-03 20:02:13 +00:00
|
|
|
|
|
|
|
return (
|
2022-12-15 20:36:15 +00:00
|
|
|
<NavWrap>
|
2022-12-15 20:23:34 +00:00
|
|
|
<StyleSelector></StyleSelector>
|
2022-12-15 20:36:15 +00:00
|
|
|
<NavBar>
|
2022-12-17 23:38:37 +00:00
|
|
|
{Links.links.map((item) => (
|
|
|
|
<NavLink active={path === item.href ? +true : +false} key={item.name} href={item.href}>
|
2022-12-15 20:36:15 +00:00
|
|
|
{item.name}
|
|
|
|
</NavLink>
|
|
|
|
))}
|
|
|
|
<NavLink key="Mastodon_Verify" rel="me" href="https://mastodon.neshweb.net/@neshura">
|
|
|
|
Mastodon
|
|
|
|
</NavLink>
|
|
|
|
</NavBar>
|
2022-12-15 21:33:40 +00:00
|
|
|
<StyleSelectorPlaceholder></StyleSelectorPlaceholder>
|
2022-12-15 20:36:15 +00:00
|
|
|
</NavWrap>
|
2022-12-03 20:02:13 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2022-12-15 20:23:34 +00:00
|
|
|
export default PageNavbar;
|