feat(ui): admin-only root link and shared header navigation
CI / quality (push) Waiting to run

This commit is contained in:
MOH
2026-03-06 16:50:45 +01:00
parent 7a20cf5c75
commit ce63cd8b69
32 changed files with 1070 additions and 600 deletions
+5 -13
View File
@@ -3,6 +3,7 @@
import { Moon, Sun } from "lucide-react";
import { useTheme } from "next-themes";
import { useEffect, useState } from "react";
import { Button } from "@/src/components/ui/button";
export function ThemeToggle() {
const { setTheme, theme, resolvedTheme } = useTheme();
@@ -14,13 +15,9 @@ export function ThemeToggle() {
if (!mounted) {
return (
<button
type="button"
className="inline-flex h-9 w-9 items-center justify-center rounded-md border border-zinc-300 text-zinc-600 dark:border-zinc-700 dark:text-zinc-200"
aria-label="Toggle theme"
>
<Button type="button" variant="outline" size="icon" aria-label="Toggle theme">
<Moon className="h-4 w-4" />
</button>
</Button>
);
}
@@ -28,13 +25,8 @@ export function ThemeToggle() {
const isDark = activeTheme === "dark";
return (
<button
type="button"
onClick={() => setTheme(isDark ? "light" : "dark")}
className="inline-flex h-9 w-9 items-center justify-center rounded-md border border-zinc-300 text-zinc-700 transition hover:bg-zinc-100 dark:border-zinc-700 dark:text-zinc-200 dark:hover:bg-zinc-800"
aria-label="Toggle theme"
>
<Button type="button" variant="outline" size="icon" onClick={() => setTheme(isDark ? "light" : "dark")} aria-label="Toggle theme">
{isDark ? <Sun className="h-4 w-4" /> : <Moon className="h-4 w-4" />}
</button>
</Button>
);
}