import Icon from '@/components/site/icon'; import { common } from '@/content/common'; import { useAppearance } from '@/hooks/use-appearance'; import { useContent } from '@/hooks/use-locale'; import { cn } from '@/lib/utils'; /** Switches the whole app between light and dark mode. */ export default function ThemeToggle({ className }: { className?: string }) { const t = useContent(common); const { resolvedAppearance, updateAppearance } = useAppearance(); const isDark = resolvedAppearance === 'dark'; const label = isDark ? t.header.toLight : t.header.toDark; return ( ); }