From b976c23fe2338f483b07cb0f0e029926d7aedc3a Mon Sep 17 00:00:00 2001 From: Kamil Pawlaczyk Date: Wed, 11 Oct 2023 23:58:45 +0200 Subject: [PATCH 1/2] feat: responsive navigation bar --- src/components/navbar.tsx | 46 ++++++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 15 deletions(-) diff --git a/src/components/navbar.tsx b/src/components/navbar.tsx index 36d7730..5319552 100644 --- a/src/components/navbar.tsx +++ b/src/components/navbar.tsx @@ -1,7 +1,10 @@ import Image from "next/image"; import NavLink, { NavLinkProps } from "./nav-link"; +import { useState } from "react"; export default function Navbar() { + const [show, setShow] = useState(false) + const links: NavLinkProps[] = [ { content: "About", @@ -18,22 +21,35 @@ export default function Navbar() { ]; return ( -
-
- banner -
-
- {links.map((link, index) => ( - - ))} +
+ ); } From be25bc617a8dc7c3fac41348ced2ca5c6d9a25cb Mon Sep 17 00:00:00 2001 From: Kamil Pawlaczyk Date: Tue, 17 Oct 2023 12:18:09 +0200 Subject: [PATCH 2/2] feat(navbar.tsx): remove collapse id --- src/components/navbar.tsx | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/src/components/navbar.tsx b/src/components/navbar.tsx index 5319552..ca9dd65 100644 --- a/src/components/navbar.tsx +++ b/src/components/navbar.tsx @@ -3,7 +3,7 @@ import NavLink, { NavLinkProps } from "./nav-link"; import { useState } from "react"; export default function Navbar() { - const [show, setShow] = useState(false) + const [show, setShow] = useState(false); const links: NavLinkProps[] = [ { @@ -21,7 +21,6 @@ export default function Navbar() { ]; return ( -