Skip to content

Instantly share code, notes, and snippets.

@igorasilveira
Last active February 19, 2022 09:44
Show Gist options
  • Save igorasilveira/3a85c87af396edff8d972e3943a662ee to your computer and use it in GitHub Desktop.
Save igorasilveira/3a85c87af396edff8d972e3943a662ee to your computer and use it in GitHub Desktop.
Navbar update
import Link from 'next/link'; // <- Imported Link from NextJS
export default function Navbar() {
return (
<nav className={styles.nav}>
<Link href="/">Navbar</Link> {/* <- Used here */}
<div>
<button>
<a href="/api/auth/login">Login</a>{" "}
{/* <- Updated here, we should keep it as an anchor tag for api routes */}
</button>
</div>
</nav>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment