import Link from "next/link"
import { navLinkStyle } from "./Styles"
import { useRouter } from "next/router"
import {
CodepenIcon,
TwitterIcon,
GithubIcon,
ReadmeIcon,
TimelineIcon,
PencilIcon,
ListIcon,
AlienIcon,
} from "assets/Icons"
import {
Placement,
offset,
flip,
shift,
autoUpdate,
useFloating,
} from '@floating-ui/react-dom';
import { ReactNode } from "react"
const nav = [
{
name: "Timline",
href: "timeline",
icon: ,
},
{
name: "Writing",
href: "writing",
icon: ,
},
{
name: "Lists",
href: "list",
icon: ,
},
]
const projects = [
{
name: "Design Docs",
slug: "design-docs",
url: "https://designdocs.co/",
},
]
const social = [
{
name: "Github",
url: "https://github.com/iamnbutler/",
icon: ,
},
{
name: "Twitter",
url: "https://twitter.com/iamnbutler",
icon: ,
},
{
name: "Codepen",
url: "https://codepen.io/iamnbutler",
icon: ,
},
{
name: "Read.cv",
url: "https://read.cv/natebutler",
icon: ,
},
]
interface NavLink {
name: string
slug?: string
url?: string
icon?: ReactNode
}
interface NavLinkItemProps {
link: NavLink
}
/**
* Build nav link items.
* If a `url` isn't passed, use `slug` to create an link
**/
function NavLinkItem({ link }: NavLinkItemProps) {
let href = ""
link.url ? (href = link.url) : (href = `/${link.slug}`)
let current = false
let currentPath = useRouter().asPath
if (currentPath.includes(href)) {
current = true
}
return (
{link.icon && {link.icon}}
{link.name}
)
}
export default function Header() {
const placement = "bottom"
return (
)
}