"use client"; import * as React from "react"; import { MoonIcon, SunIcon } from "@radix-ui/react-icons"; import { useTheme } from "next-themes"; import { useHasMounted } from "@/lib/utils"; import { Button } from "./ui/button"; export default function SettingsThemeToggle() { const hasMounted = useHasMounted(); const { setTheme, theme } = useTheme(); if (!hasMounted) { return null; } const nextTheme = theme === "light" ? "dark" : "light"; return ( ); }