Finalize multilingual routing and translations
CI / quality (push) Waiting to run

This commit is contained in:
MOH
2026-03-07 14:10:30 +01:00
parent 1ad9ae9629
commit 7f4277d1d7
53 changed files with 2805 additions and 1382 deletions
+9 -4
View File
@@ -3,9 +3,14 @@
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() {
import { Button } from "@/components/ui/button";
type ThemeToggleProps = {
ariaLabel?: string;
};
export function ThemeToggle({ ariaLabel = "Toggle theme" }: ThemeToggleProps) {
const { setTheme, theme, resolvedTheme } = useTheme();
const [mounted, setMounted] = useState(false);
@@ -15,7 +20,7 @@ export function ThemeToggle() {
if (!mounted) {
return (
<Button type="button" variant="outline" size="icon" aria-label="Toggle theme">
<Button type="button" variant="outline" size="icon" aria-label={ariaLabel}>
<Moon className="h-4 w-4" />
</Button>
);
@@ -25,7 +30,7 @@ export function ThemeToggle() {
const isDark = activeTheme === "dark";
return (
<Button type="button" variant="outline" size="icon" onClick={() => setTheme(isDark ? "light" : "dark")} aria-label="Toggle theme">
<Button type="button" variant="outline" size="icon" onClick={() => setTheme(isDark ? "light" : "dark")} aria-label={ariaLabel}>
{isDark ? <Sun className="h-4 w-4" /> : <Moon className="h-4 w-4" />}
</Button>
);