From 3581bc27f37fba806addb06a6931f67011f552a7 Mon Sep 17 00:00:00 2001 From: cedoor Date: Wed, 8 Nov 2023 17:46:49 +0000 Subject: [PATCH] refactor(website): close navbar menu after clicking on links --- apps/website/src/components/Navbar.tsx | 2 +- apps/website/src/components/NavbarLinks.tsx | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/apps/website/src/components/Navbar.tsx b/apps/website/src/components/Navbar.tsx index 1e6d3952b..2a976b427 100644 --- a/apps/website/src/components/Navbar.tsx +++ b/apps/website/src/components/Navbar.tsx @@ -56,7 +56,7 @@ export default function Navbar() { - + diff --git a/apps/website/src/components/NavbarLinks.tsx b/apps/website/src/components/NavbarLinks.tsx index bf9473433..cdae53591 100644 --- a/apps/website/src/components/NavbarLinks.tsx +++ b/apps/website/src/components/NavbarLinks.tsx @@ -5,12 +5,17 @@ import NextLink from "next/link" import { usePathname } from "next/navigation" import IconArrowUpRight from "../icons/IconArrowUpRight" -export default function NavbarLinks() { +export type NavbarProps = { + onClick?: () => void +} + +export default function NavbarLinks({ onClick }: NavbarProps) { const pathname = usePathname() return ( <>