From 65d13e017301f9d61e5d7f6089b45bb8a62756bb Mon Sep 17 00:00:00 2001 From: Aayush Kumar Bhat Date: Thu, 31 Oct 2024 23:47:39 +0530 Subject: [PATCH] Navbar --- app/(root)/page.tsx | 319 +++++++++++++++++++++++++------------------- 1 file changed, 179 insertions(+), 140 deletions(-) diff --git a/app/(root)/page.tsx b/app/(root)/page.tsx index 08ef14c..a966c62 100644 --- a/app/(root)/page.tsx +++ b/app/(root)/page.tsx @@ -54,13 +54,25 @@ function Navbar({ darkMode, toggleDarkMode, isOpen, setIsOpen }: NavbarProps) { setDropdownOpen(false); }; + const handleToggleDarkMode = () => { + if (!darkMode) { + toggleDarkMode(); // Only toggle if currently light mode + } + }; + + const handleToggleLightMode = () => { + if (darkMode) { + toggleDarkMode(); // Only toggle if currently dark mode + } + }; + return (