From 77a9b32841adbe96758293a813dec0767e777b36 Mon Sep 17 00:00:00 2001 From: Oliver Bryan <04oliverbryan@gmail.com> Date: Wed, 7 Jan 2026 23:43:05 +0000 Subject: [PATCH] minor sidebar + buttons adjustments --- src/Layout.tsx | 28 +++++++++++++++++++++++++--- src/components/theme-toggle.tsx | 9 +++++---- src/components/ui/button.tsx | 2 +- 3 files changed, 31 insertions(+), 8 deletions(-) diff --git a/src/Layout.tsx b/src/Layout.tsx index 8bfe866..068bfc1 100644 --- a/src/Layout.tsx +++ b/src/Layout.tsx @@ -1,16 +1,38 @@ import ThemeToggle from "@/components/theme-toggle"; +import { Link, useLocation } from "react-router-dom"; +import { Home, Settings } from "lucide-react"; +import { Button } from "@/components/ui/button"; export default function Layout({ children }: { children: React.ReactNode }) { + const location = useLocation(); + return (
{/* sidebar - fixed width */} - + +
+ + {location.pathname !== "/settings" && ( + + + + )} + {location.pathname !== "/" && ( + + + + )} +
+
{/* canvas area - flex-1 */}
{children}
diff --git a/src/components/theme-toggle.tsx b/src/components/theme-toggle.tsx index 9d112fa..5e6427b 100644 --- a/src/components/theme-toggle.tsx +++ b/src/components/theme-toggle.tsx @@ -1,8 +1,9 @@ import { Moon, Sun } from "lucide-react"; import { useEffect, useState } from "react"; import { Button } from "@/components/ui/button"; +import { cn } from "@/lib/utils"; -function ThemeToggle() { +function ThemeToggle({ className }: { className?: string }) { const [theme, setTheme] = useState(); useEffect(() => { @@ -22,9 +23,9 @@ function ThemeToggle() { return (