From 140db252f4fff3f3c6517fd0c05d5df08aa98645 Mon Sep 17 00:00:00 2001 From: Christopher Forti Date: Sun, 4 Aug 2024 18:05:59 -0400 Subject: [PATCH] More adjustments to my use state function. --- src/components/Header.tsx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/components/Header.tsx b/src/components/Header.tsx index e9fe10a..3051d1b 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -7,21 +7,26 @@ type HeaderProps = { export function Header({ setHeaderNavigation }: HeaderProps) { const [isOpen, setIsOpen] = useState(false); + const toggleHeader = () => { + setIsOpen(!isOpen); + setHeaderNavigation((prev) => prev + 1); + }; + return (
- - React Blog - + React Blog +