From ca3ae0db6e8e3f2cf99423797c60f5c2cc66a780 Mon Sep 17 00:00:00 2001
From: Biswa Kalyan Bhuyan <biswa@surgot.in>
Date: Thu, 29 May 2025 20:57:31 +0530
Subject: feat: added the product page and enhanced the UI

- added the product page where the product details is shown
- enhanced the nav bar to handle the rendering
- added the loading screen to the page
- fixed the rendering method to the navigation-menu
---
 frontend/src/components/theme-toggle.tsx | 23 ++---------------------
 1 file changed, 2 insertions(+), 21 deletions(-)

(limited to 'frontend/src/components/theme-toggle.tsx')

diff --git a/frontend/src/components/theme-toggle.tsx b/frontend/src/components/theme-toggle.tsx
index 7532775..09a5fb8 100644
--- a/frontend/src/components/theme-toggle.tsx
+++ b/frontend/src/components/theme-toggle.tsx
@@ -14,26 +14,6 @@ import {
 
 export function ThemeToggle() {
   const { setTheme, theme } = useTheme()
-  const [mounted, setMounted] = React.useState(false)
-
-  // Ensure we only render the correct icon after mounting to avoid hydration mismatch
-  React.useEffect(() => {
-    setMounted(true)
-  }, [])
-
-  if (!mounted) {
-    return (
-      <Button 
-        variant="ghost" 
-        size="icon" 
-        className="nav-button-transparent backdrop-blur-sm min-w-[44px] min-h-[44px]"
-        disabled
-      >
-        <Monitor className="h-5 w-5" />
-        <span className="sr-only">Toggle theme</span>
-      </Button>
-    )
-  }
 
   return (
     <DropdownMenu>
@@ -41,7 +21,8 @@ export function ThemeToggle() {
         <Button 
           variant="ghost" 
           size="icon" 
-          className="nav-button-transparent backdrop-blur-sm min-w-[44px] min-h-[44px]"
+          className="nav-button-transparent min-w-[44px] min-h-[44px] cursor-pointer"
+          suppressHydrationWarning
         >
           {/* Simple icon transitions with consistent styling */}
           <Sun className="h-5 w-5 rotate-0 scale-100 transition-all duration-500 ease-in-out dark:-rotate-180 dark:scale-0" />
-- 
cgit v1.2.3-59-g8ed1b

