diff --git a/src/components/DashboardHeader.tsx b/src/components/DashboardHeader.tsx index ac6ec6e5..5fcde0a2 100644 --- a/src/components/DashboardHeader.tsx +++ b/src/components/DashboardHeader.tsx @@ -19,6 +19,9 @@ import KeyboardShortcuts from "@/components/KeyboardShortcuts"; import { Moon, Sun } from "lucide-react"; import { toast } from "sonner"; +import { useIsMobile } from "@/hooks/useIsMobile"; + + type DashboardSyncContextValue = { lastSynced: Date | null; }; @@ -99,6 +102,8 @@ export default function DashboardHeader() { const [isNightOwl, setIsNightOwl] = useState(false); const [isEarlyBird, setIsEarlyBird] = useState(false); + const isMobile = useIsMobile(); + useEffect(() => { const computeCurrentGreeting = () => { const currentHour = new Date().getHours(); @@ -204,7 +209,7 @@ export default function DashboardHeader() {
-
+
{/* Left Section */}
@@ -261,110 +266,130 @@ export default function DashboardHeader() { {/* Right Section */} {/* Right Section */} -
-
- {isPublic === true && session?.githubLogin && ( - - Share Profile - - )} - -
-
- -
- -
- -
- -
- -
- -
- -
- -
- -
-
-
+ + {!isMobile && +
+
+ {isPublic === true && session?.githubLogin && ( + + Share Profile + + )} + + +
+
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+
+
+
+ + } + {/* Mobile hamburger button */} + +{isMobile && +
+ +
+ +
+
+
+
- {/* Mobile hamburger button */} + type="button" + className="inline-flex items-center justify-center self-start rounded-xl border border-[var(--border)] bg-[var(--card-muted)]/70 p-2 text-[var(--card-foreground)] shadow-sm transition-all duration-200 hover:border-[var(--accent)] hover:text-[var(--accent)] " + onClick={() => setMenuOpen((v) => !v)} + aria-label="Toggle menu" + aria-expanded={menuOpen} + > + {menuOpen ? ( + + ) : ( + + )} + +
+ + +
+ + } + +
{/* Mobile dropdown */} {menuOpen && ( -
-
-
+
+
+
-
- -
+
-
+
-
- -
+
{isPublic === true && session?.githubLogin && ( diff --git a/src/components/SignOutButton.tsx b/src/components/SignOutButton.tsx index c1e16803..cf0d77aa 100644 --- a/src/components/SignOutButton.tsx +++ b/src/components/SignOutButton.tsx @@ -80,7 +80,7 @@ export default function SignOutButton() { )} - Sign out + Signout ) } diff --git a/src/components/ThemeToggle.tsx b/src/components/ThemeToggle.tsx index ae9531c8..27361b3e 100644 --- a/src/components/ThemeToggle.tsx +++ b/src/components/ThemeToggle.tsx @@ -53,7 +53,7 @@ export default function ThemeToggle() { const currentDescription = themeDefinition?.description ?? "Customize the dashboard palette"; return ( -