From 6973e1044fa67fe69fb2ec9c69c18854a22573c4 Mon Sep 17 00:00:00 2001 From: Skander Mzali Date: Mon, 11 Mar 2024 17:48:11 -0700 Subject: [PATCH 1/2] Add function to open drawer on brand click in mobile --- ui/src/components/Header.tsx | 19 +++++++++++++------ ui/src/components/layouts/MapLayout.tsx | 6 +++++- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/ui/src/components/Header.tsx b/ui/src/components/Header.tsx index 58b70054..0831e844 100644 --- a/ui/src/components/Header.tsx +++ b/ui/src/components/Header.tsx @@ -28,7 +28,11 @@ import wordmark from "@/public/wordmark/wordmark-white.svg"; import { displayDesktopOnly, displayMobileOnly } from "@/styles/responsive"; import { analytics } from "@/utils/analytics"; -export default function Header() { +export default function Header({ + onBrandClick, +}: { + onBrandClick?: () => void; +}) { return ( - + ); } -function Mobile(props: { window?: () => Window }) { +function Mobile(props: { window?: () => Window; onBrandClick?: () => void }) { const { window } = props; const drawerWidth = "100%"; const [menuIsOpen, setMenuOpen] = useState(false); @@ -96,7 +100,7 @@ function Mobile(props: { window?: () => Window }) { > {menuIsOpen ? : } - +