"use client" import * as React from "react" import { useTheme } from "next-themes" import { Button } from "@/components/ui/button" export function ThemeToggle() { const { setTheme, theme, resolvedTheme } = useTheme() const [mounted, setMounted] = React.useState(false) React.useEffect(() => { setMounted(true) }, []) if (!mounted) { return null } const toggleTheme = () => { setTheme(resolvedTheme === "light" ? "dark" : "light") } return ( ) } function SunIcon(props: React.SVGProps) { return ( ) } function MoonIcon(props: React.SVGProps) { return ( ) }