- Remove all props from Chat (showHeader, headerActions) making it a zero-config pure chat component with only connection input, messages, and send functionality - Create AppHeader client component for web app with brand, theme toggle, disconnect button, and useHubInit - Add disconnect button to desktop layout header - Add reset() action to hub store to eliminate duplicated state reset - Remove unused token field from gateway store - Remove dead code: connection-bar.tsx - Guard handleConnect against empty deviceId race condition Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
22 lines
700 B
TypeScript
22 lines
700 B
TypeScript
"use client";
|
|
|
|
import { useTheme } from "next-themes";
|
|
import { Button } from "@multica/ui/components/ui/button";
|
|
import { HugeiconsIcon } from "@hugeicons/react";
|
|
import { Sun01Icon, Moon01Icon } from "@hugeicons/core-free-icons";
|
|
|
|
export function ThemeToggle() {
|
|
const { theme, setTheme } = useTheme();
|
|
|
|
return (
|
|
<Button
|
|
variant="ghost"
|
|
size="icon"
|
|
onClick={() => setTheme(theme === "dark" ? "light" : "dark")}
|
|
className="size-8 text-muted-foreground"
|
|
>
|
|
<HugeiconsIcon icon={Sun01Icon} strokeWidth={1.5} className="size-4 dark:hidden" />
|
|
<HugeiconsIcon icon={Moon01Icon} strokeWidth={1.5} className="size-4 hidden dark:block" />
|
|
</Button>
|
|
);
|
|
}
|