"use client"; import { useEffect, useState } from "react"; import { useTheme } from "next-themes"; import { THEMES } from "@/lib/themes"; import { useThemeId } from "@/lib/use-theme-id"; import { Check, Moon, Sun } from "lucide-react"; import { cn } from "@/lib/utils"; /** * ThemePicker — the only theme control in the app. * * One row: 4 base themes. Below: a single light/dark toggle. No custom * theme builder, no standout vs standard split — every theme is a * first-class base palette inspired by a real product surface. */ export function ThemePicker() { const { theme: mode, setTheme: setMode } = useTheme(); const { themeId, setThemeId } = useThemeId(); const [mounted, setMounted] = useState(false); useEffect(() => setMounted(true), []); // eslint-disable-line react-hooks/set-state-in-effect return (
{/* Base themes */}
Theme
{THEMES.map((t) => ( setThemeId(t.id)} /> ))}
{/* Light / dark toggle */}
Mode
); } function ThemeCard({ theme, active, onSelect, }: { theme: (typeof THEMES)[number]; active: boolean; onSelect: () => void; }) { return ( ); }