Skip to content

Instantly share code, notes, and snippets.

@SandyLudosky
Created January 27, 2023 16:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SandyLudosky/90f80885decad8608da385d01bad5905 to your computer and use it in GitHub Desktop.
Save SandyLudosky/90f80885decad8608da385d01bad5905 to your computer and use it in GitHub Desktop.
import Link from "next/link"
export default function Layout({ children }) {
const links = [
{
title: "Home",
path: "/"
},
{
title: "Top Stories",
path: "/news/top-stories"
},
{
title: "Popular",
path: "/news/popular"
},
{
title: "Sections",
path: "/sections"
}
];
return(
<>
{links.map(link => {
return <Link href={link.path}><a>{link.title}{" "}</a></Link>;
})}
{children}
</>
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment