Created
January 27, 2023 16:15
-
-
Save SandyLudosky/90f80885decad8608da385d01bad5905 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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