From f2d1c8fefab0d4b70b540fbd55de551da94a6cc1 Mon Sep 17 00:00:00 2001 From: Saad Rasheed <84860156+saadrasheeddev@users.noreply.github.com> Date: Sat, 19 Oct 2024 09:21:48 +0500 Subject: [PATCH 1/3] Update Header.js --- src/components/header/Header.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/components/header/Header.js b/src/components/header/Header.js index 6218f1950c..4097111723 100644 --- a/src/components/header/Header.js +++ b/src/components/header/Header.js @@ -1,4 +1,4 @@ -import React, {useContext} from "react"; +import React, {useContext, useRef} from "react"; import Headroom from "react-headroom"; import "./Header.scss"; import ToggleSwitch from "../ToggleSwitch/ToggleSwitch"; @@ -24,6 +24,14 @@ function Header() { const viewTalks = talkSection.display; const viewResume = resumeSection.display; + const menuCheckboxRef = useRef(null); + + const handleMenuItemClick = () => { + if (menuCheckboxRef.current) { + menuCheckboxRef.current.checked = false; + } + }; + return (
@@ -32,7 +40,7 @@ function Header() { {greeting.username} /> - +