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 (